Class: Settings
- Inherits:
-
Object
show all
- Defined in:
- lib/settings.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, value = nil, &block) ⇒ Object
7
8
9
10
|
# File 'lib/settings.rb', line 7
def method_missing(method, value=nil, &block)
set(method, value, block) if !value.nil? or block
get(method)
end
|
Instance Method Details
2
3
4
5
|
# File 'lib/settings.rb', line 2
def configure(configuration=nil, &block)
instance_eval(&configuration) if configuration
instance_eval(&block) if block
end
|