Class: Delegator

Inherits:
Object
  • Object
show all
Defined in:
lib/logger-http/delegator.rb

Instance Method Summary collapse

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