Skip to content

Commit

Permalink
+ Optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Mar 18, 2013
1 parent 8a64c10 commit 8464c77
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/phony/validators.rb
Expand Up @@ -73,10 +73,9 @@ def plausible? number, hints = {}
# Country specific checks.
#
validators = [*validator_for(cc)]
valid = validators.map do |validator|
validator.plausible? ndc, rest
validators.map do |validator|
return false unless validator.plausible? ndc, rest
end
return false if valid.include? false

true
rescue StandardError
Expand Down

0 comments on commit 8464c77

Please sign in to comment.