提交 dc33cd62 编写于 作者: S Santiago Pastorino

Use unless instead of if nil?

上级 5f607351
......@@ -48,7 +48,7 @@ def initialize(number)
# number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delimiter => ".")
# => +1.123.555.1234 x 1343
def number_to_phone(number, options = {})
return nil if number.nil?
return nil unless number
begin
Float(number)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册