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