Class: WithObject::WithContext
- Inherits:
-
Object
- Object
- WithObject::WithContext
- Defined in:
- lib/with_object.rb
Instance Method Summary collapse
-
#initialize(object) ⇒ WithContext
constructor
A new instance of WithContext.
- #method_missing(meth, *args, &block) ⇒ Object
Constructor Details
#initialize(object) ⇒ WithContext
Returns a new instance of WithContext.
13 14 15 |
# File 'lib/with_object.rb', line 13 def initialize(object) @object = object end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
17 18 19 |
# File 'lib/with_object.rb', line 17 def method_missing(meth, *args, &block) @object.public_send(meth, *args, &block) end |