Sha256: a3ba14f53bf32747b9a11687951cab111ea0fc048ed477169af82adf8a2342fd

Contents?: true

Size: 492 Bytes

Versions: 52

Compression:

Stored size: 492 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

module TwitterCldr
  module Shared
    module PhoneCodes

      class << self

        def territories
          resource.keys
        end

        def code_for_territory(territory)
          resource[territory.to_s.downcase.to_sym]
        end

        private

        def resource
          @resource ||= TwitterCldr.get_resource(:shared, :phone_codes)
        end

      end

    end
  end
end

Version data entries

52 entries across 52 versions & 3 rubygems

Version Path
twitter_cldr-2.4.0 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-2.2.0 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-2.1.1 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-2.1.0 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-2.0.2 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-2.0.1 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-2.0.0 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-1.9.1 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-1.9.0 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-1.8.1 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-1.8.0 lib/twitter_cldr/shared/phone_codes.rb
twitter_cldr-1.7.0 lib/twitter_cldr/shared/phone_codes.rb