class ISO3166::Subdivision

def [](attr_name)

def [](attr_name)
  send attr_name
end

def code_with_translations

Returns:
  • (Hash) - A hash with the subdivision code as key and the hash of translated subdivision names ( locale => name ) as value.
def code_with_translations
  { code => translations }
end

def initialize(attrs)

def initialize(attrs)
  attrs.each_pair do |key, value|
    send "#{key}=", value
  end
end

def match?(subdivision_str)

def match?(subdivision_str)
  name == subdivision_str ||
    translations.values.include?(subdivision_str)
end