Class: Configuration::Pure
- Inherits:
-
Object
- Object
- Configuration::Pure
- Defined in:
- lib/configuration.rb
Constant Summary collapse
- Instance_Methods =
Hash.new
- Protected =
%r/^__|^object_id$/
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(object) ⇒ Pure
constructor
A new instance of Pure.
- #method_missing(m, *a, &b) ⇒ Object
Constructor Details
#initialize(object) ⇒ Pure
Returns a new instance of Pure.
221 222 223 |
# File 'lib/configuration.rb', line 221 def initialize object @object = object end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *a, &b) ⇒ Object
217 218 219 |
# File 'lib/configuration.rb', line 217 def method_missing m, *a, &b Instance_Methods[m.to_s].bind(@object).call(*a, &b) end |
Class Method Details
.[](object) ⇒ Object
225 226 227 |
# File 'lib/configuration.rb', line 225 def Pure.[] object new object end |