lib/codebreaker/loader.rb in codebreaker_kub-0.1.2 vs lib/codebreaker/loader.rb in codebreaker_kub-0.1.3

- old
+ new

@@ -1,7 +1,7 @@ module Codebreaker module Loader - PATH = 'lib/codebreaker/data/'.freeze + PATH = File.join(File.dirname(__FILE__), 'data/').freeze EXTENCTION = '.yml'.freeze def self.load(file_name) file_name = PATH + file_name + EXTENCTION.to_s if File.exist?(file_name) YAML.load_file(file_name)