Module: Geolookup

Defined in:
lib/geolookup.rb,
lib/geolookup/country.rb,
lib/geolookup/version.rb,
lib/geolookup/usa/state.rb,
lib/geolookup/usa/county.rb

Defined Under Namespace

Modules: Country, USA

Constant Summary collapse

VERSION =
"0.5.4"

Class Method Summary collapse

Class Method Details

.load_hash_from_file(file) ⇒ Object

self.load_file

Loads a given .yml file that contains a hash and returns the hash



12
13
14
15
16
17
# File 'lib/geolookup.rb', line 12

def self.load_hash_from_file(file)
  fileName = File.open(file, "r")
  hash = YAML.load(fileName)     
  fileName.close
  hash
end