Module: HaystackRuby::Config
Instance Attribute Summary collapse
-
#projects ⇒ Object
Returns the value of attribute projects.
Instance Method Summary collapse
-
#load!(path, environment = nil) ⇒ Object
called in railtie.
- #load_configuration(conf) ⇒ Object
Instance Attribute Details
#projects ⇒ Object
Returns the value of attribute projects.
4 5 6 |
# File 'lib/haystack_ruby/config.rb', line 4 def projects @projects end |
Instance Method Details
#load!(path, environment = nil) ⇒ Object
called in railtie
15 16 17 18 19 20 |
# File 'lib/haystack_ruby/config.rb', line 15 def load!(path, environment = nil) require 'yaml' environment ||= Rails.env conf = YAML.load(File.new(path).read).with_indifferent_access[environment] load_configuration(conf) end |