Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

+ More elegant parameter handling

  • Loading branch information...
commit d1d355731e400abe2765ce4781c9afdb3592fd97 1 parent e3aa57a
@floere authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/phony/dsl.rb
View
4 lib/phony/dsl.rb
@@ -49,11 +49,11 @@ class DSL
# Example:
# country '27', # CC, followed by rules, for example fixed(2) >> ...
#
- def country country_code, country, validators = nil
+ def country country_code, country, validators = []
Phony::CountryCodes.instance.add country_code, country
[*validators].each do |validator|
Phony::Validators.instance.add country_code, validator
- end if validators
+ end
end
# National matcher & splitters.
Please sign in to comment.
Something went wrong with that request. Please try again.