Permalink
Browse files

+ More elegant parameter handling

  • Loading branch information...
1 parent e3aa57a commit d1d355731e400abe2765ce4781c9afdb3592fd97 @floere committed Mar 18, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/phony/dsl.rb
View
@@ -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.

0 comments on commit d1d3557

Please sign in to comment.