Sha256: dd872875ac7b591e60a123cc9089f65445df6a27493076c72e6c06ac3894ca99
Contents?: true
Size: 361 Bytes
Versions: 1
Compression:
Stored size: 361 Bytes
Contents
require 'yaml' module ZipCodes VERSION = '0.2.1' class << self def identify code db[code] end def db @db ||= begin this_file = File.expand_path(File.dirname(__FILE__)) us_data = File.join(this_file, "data", "US.yml") YAML.load(File.open(us_data)) end end def load db end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zip-codes-0.2.1 | lib/zip-codes.rb |