Class: Valiban::Rules

Inherits:
Object
  • Object
show all
Defined in:
lib/valiban/rules.rb

Class Method Summary collapse

Class Method Details

.load(country_code) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/valiban/rules.rb', line 10

def self.load(country_code)
  begin
    YAML.load(File.read(File.expand_path("../iban_rules.yml", __FILE__)))[country_code.downcase]
  rescue Errno::ENOENT
    {}
  end
end