Sha256: ad01ddd45f9c173f37eaed13288cd18c50868cd9bba32eeec24e2b9c4961e2d9

Contents?: true

Size: 551 Bytes

Versions: 2

Compression:

Stored size: 551 Bytes

Contents

module Geolookup
  module Country
    module PhoneCodes

      COUNTRY_TO_PHONE_CODE_FILE = 'COUNTRY_TO_PHONE_CODE.yml'

      @country_to_phone_code

      def self.country_to_phone_code(country_code)
        @country_to_phone_code ||= Geolookup.load_hash_from_file(COUNTRY_TO_PHONE_CODE_FILE)
        @country_to_phone_code[country_code]
      end
      
      def self.country_phone_codes
        @country_to_phone_code ||= Geolookup.load_hash_from_file(COUNTRY_TO_PHONE_CODE_FILE)
        @country_to_phone_code.values
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
geolookup-0.6.4 lib/geolookup/country_phone_codes.rb
geolookup-0.6.2 lib/geolookup/country_phone_codes.rb