Sha256: 1e849272dba700d68d7ac907a1cfe14b379d7a41ee31aaf1ab70a04ad43ceac7

Contents?: true

Size: 401 Bytes

Versions: 29

Compression:

Stored size: 401 Bytes

Contents

module TelephoneNumber
  class TimeZoneDataImporter
    def self.load_data!
      master_data = {}
      File.open('data/timezones/map_data.txt', 'rb').each do |row|
        number_prefix, timezone = row.split('|').map(&:strip)
        master_data[number_prefix] = timezone
      end

      File.open('data/timezones/map_data.dat', 'wb') { |file| file << Marshal.dump(master_data) }
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
telephone_number-1.4.1 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.0 lib/importers/time_zone_data_importer.rb
telephone_number-1.3.5 lib/importers/time_zone_data_importer.rb
telephone_number-1.3.4 lib/importers/time_zone_data_importer.rb
telephone_number-1.3.3 lib/importers/time_zone_data_importer.rb
telephone_number-1.3.1 lib/importers/time_zone_data_importer.rb
telephone_number-1.3.0 lib/importers/time_zone_data_importer.rb
telephone_number-1.2.4 lib/importers/time_zone_data_importer.rb
telephone_number-1.2.3 lib/importers/time_zone_data_importer.rb