Sha256: d8dca03dd5c29240c0158b116477a540db33587e49f25cccabc2bfbb0e9f6309

Contents?: true

Size: 260 Bytes

Versions: 5

Compression:

Stored size: 260 Bytes

Contents

class ISO::Region < ISO::Subtag
  DEFINITIONS_FILE   = "#{File.dirname(__FILE__)}/../../data/iso-3166-1.yml"

  def self.identify(full_code)
    full_code =~ /[-_]([A-Z]{2})$/ ? find($1) : nil
  end

private

  def i18n_scope
    super << ".regions"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
iso-0.4.0 lib/iso/region.rb
iso-0.3.0 lib/iso/region.rb
iso-0.2.2 lib/iso/region.rb
iso-0.2.1 lib/iso/region.rb
iso-0.2.0 lib/iso/region.rb