lib/geolookup.rb in geolookup-0.5.3 vs lib/geolookup.rb in geolookup-0.5.4

- old
+ new

@@ -2,7 +2,17 @@ require "geolookup/usa/county" require "geolookup/usa/state" require "geolookup/country" module Geolookup - + ################################################################### + # self.load_file + # + # Loads a given .yml file that contains a hash and returns the hash + # + def self.load_hash_from_file(file) + fileName = File.open(file, "r") + hash = YAML.load(fileName) + fileName.close + hash + end end