Module: Cran::Config
Instance Method Summary collapse
Instance Method Details
#get(*nodes) ⇒ Object
6 7 8 |
# File 'lib/cran/config.rb', line 6 def get(*nodes) nodes.inject(load){|s,x| s[x]} end |
#load ⇒ Object
10 11 12 13 |
# File 'lib/cran/config.rb', line 10 def load config_url = File.join(Cran.root_path, "config", 'cran.yml') @config ||= YAML.load_file(config_url).with_indifferent_access end |