Sha256: 1536dfcffa865fef99d885879aad8e0232a159f6b8621753f1808677e3a22374
Contents?: true
Size: 350 Bytes
Versions: 5
Compression:
Stored size: 350 Bytes
Contents
# frozen_string_literal: true require 'bundler/gem_tasks' require 'yaml' task :convert do codes = {} File.open('lib/data/US.txt').each_line do |line| array = line.split('\t') codes[array[1]] = { state_code: array[4], state_name: array[3], city: array[2] } end File.write('lib/data/US.yml', codes.to_yaml) end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
zip-codes-0.3.4 | Rakefile |
zip-codes-0.3.3 | Rakefile |
zip-codes-0.3.2 | Rakefile |
zip-codes-0.3.1 | Rakefile |
zip-codes-0.3.0 | Rakefile |