class Hanoi::Jane::Config
Public Class Methods
new()
click to toggle source
# File lib/hanoi/jane/config.rb, line 6 def initialize reset! end
Public Instance Methods
config()
click to toggle source
# File lib/hanoi/jane/config.rb, line 14 def config @config end
reset!()
click to toggle source
# File lib/hanoi/jane/config.rb, line 10 def reset! # testing a singleton is hard @config = OpenStruct.new fetch_yaml 'config' end
Private Instance Methods
fetch_yaml(file)
click to toggle source
# File lib/hanoi/jane/config.rb, line 20 def fetch_yaml file YAML.load(File.open(File.join(File.dirname(__FILE__), '..', '..', '..', 'config/%s.yml' % file))) end