lib/rasti/app/settings.rb in rasti-app-7.0.2 vs lib/rasti/app/settings.rb in rasti-app-7.1.0
- old
+ new
@@ -1,21 +1,21 @@
module Rasti
class App
class Settings
class << self
- def load(environment)
- load_file File.join(Dir.pwd, "#{environment}.yml")
+ def load(environment, options={})
+ load_file File.join(Dir.pwd, "#{environment}.yml"), options
end
- def load_file(filename)
- Hash::Accessible.new(evaluate(File.read(filename))).deep_freeze
+ def load_file(filename, options={})
+ Hash::Accessible.new(evaluate(File.read(filename), options)).deep_freeze
end
private
- def evaluate(yml)
- YAML.load ERB.new(yml).result
+ def evaluate(yml, options={})
+ YAML.load ERB.new(yml).result_with_hash(options)
end
end
end
end
\ No newline at end of file