module WorldPostalcodes

@return Details like state name, city name, post office based on pincode.

Constants

VERSION

Public Class Methods

db() click to toggle source

Find details from yaml file

# File lib/world_postalcodes.rb, line 13
def db
  @db ||= begin
    this_file = File.expand_path(File.dirname(__FILE__))
    data = File.join(this_file, 'data/postal_codes.yml')
    YAML.load(File.open(data))
  end
end
load() click to toggle source

Preload yaml file

# File lib/world_postalcodes.rb, line 21
def load
  db
end