lib/lopata/environment.rb in lopata-0.1.31 vs lib/lopata/environment.rb in lopata-0.1.32
- old
+ new
@@ -16,11 +16,11 @@
# @see Lopata::Configuration#env
def initialize(env = Lopata.configuration.env)
require 'yaml'
@config = {}
config_filename = "./config/environments/#{Lopata.configuration.env}.yml"
- @config = YAML::load(File.open(config_filename)) if File.exists?(config_filename)
+ @config = YAML::load(File.open(config_filename)) if File.exist?(config_filename)
end
# Access to environment settings
# @param key [Symbol] environment configuration key is set on yml configuration.
def [](key)
@@ -31,6 +31,6 @@
define_method opt do
@config[opt]
end
end
end
-end
\ No newline at end of file
+end