lib/bic_validation/bic.rb in bic_validation-0.3.0 vs lib/bic_validation/bic.rb in bic_validation-0.3.1
- old
+ new
@@ -18,13 +18,13 @@
def has_valid_country_code?
country_codes.include? country
end
- def has_valid_branch_code?
+ def has_valid_location_code?
# WTF? http://de.wikipedia.org/wiki/ISO_9362
- country[0] =~ /[^01]/ && country[1] =~ /[^O]/
+ location[0] =~ /[^01]/ && location[1] =~ /[^O]/
end
def known?
!known_bics.include?(country.to_sym) ||
known_bics[country.to_sym].include?(@code.try(:gsub, /XXX$/, ''))
@@ -32,10 +32,10 @@
def valid?
of_valid_length? &&
of_valid_format? &&
has_valid_country_code? &&
- has_valid_branch_code?
+ has_valid_location_code?
end
def invalid?
!valid?
end