| Class | Configatron |
| In: |
lib/configatron/configatron.rb
lib/configatron/errors.rb lib/configatron/proc.rb lib/configatron/rails.rb lib/configatron/store.rb |
| Parent: | Object |
| send | -> | send! |
Forwards the method call onto the ‘namespaced’ Configatron::Store
# File lib/configatron/configatron.rb, line 14
14: def method_missing(sym, *args)
15: @_store[@_namespace.last].send(sym, *args)
16: end
Removes ALL configuration parameters
# File lib/configatron/configatron.rb, line 19
19: def reset!
20: @_store = {:default => Configatron::Store.new}
21: end
Allows for the temporary overriding of parameters in a block. Takes an optional Hash of parameters that will be applied before the block gets called. At the end of the block, the temporary settings are deleted and the original settings are reinstated.
# File lib/configatron/configatron.rb, line 27
27: def temp(options = nil)
28: begin
29: temp_start(options)
30: yield
31: rescue Exception => e
32: raise e
33: ensure
34: temp_end
35: end
36: end
# File lib/configatron/configatron.rb, line 47
47: def temp_end
48: @_store.delete(@_namespace.pop)
49: end