Class: WithObject::WithContext

Inherits:
Object
  • Object
show all
Defined in:
lib/with_object.rb

Instance Method Summary collapse

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