Class: Hanoi::Jane::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/hanoi/jane/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



6
7
8
# File 'lib/hanoi/jane/config.rb', line 6

def initialize
  reset!
end

Instance Method Details

#configObject



14
15
16
# File 'lib/hanoi/jane/config.rb', line 14

def config
  @config
end

#reset!Object

testing a singleton is hard



10
11
12
# File 'lib/hanoi/jane/config.rb', line 10

def reset! # testing a singleton is hard
  @config = OpenStruct.new fetch_yaml 'config'
end