module HaystackRuby::Config
Attributes
projects[RW]
Public Instance Methods
load!(path, environment = nil)
click to toggle source
called in railtie
# 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
load_configuration(conf)
click to toggle source
# File lib/haystack_ruby/config.rb, line 6 def load_configuration conf @projects = {} conf.each do |name, config| p = Project.new(name, config) @projects[name] = p if p.valid? end end