Permalink
Browse files

+ Optimize code

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

0 comments on commit 8464c77

Please sign in to comment.