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

- old
+ new

@@ -7,12 +7,9 @@ ################################################################### # 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 + def self.load_hash_from_file(file_name) + YAML.load_file(File.join(File.dirname(__FILE__), "data/", file_name)) end end