Class: Delegator
- Inherits:
-
Object
- Object
- Delegator
- Defined in:
- lib/logger-http/delegator.rb
Instance Method Summary collapse
-
#initialize(obj) ⇒ Delegator
constructor
A new instance of Delegator.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(obj) ⇒ Delegator
Returns a new instance of Delegator.
2 3 4 |
# File 'lib/logger-http/delegator.rb', line 2 def initialize obj @obj = obj end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
6 7 8 9 |
# File 'lib/logger-http/delegator.rb', line 6 def method_missing name, *args puts name, args.inspect @obj.send(name, *args) end |