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.22 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.21 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.20 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.19 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.18 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.16 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.15 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.14 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.13 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.12 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.11 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.10 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.9 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.8 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.7 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.6 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.5 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.4 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.3 lib/importers/time_zone_data_importer.rb
telephone_number-1.4.2 lib/importers/time_zone_data_importer.rb