Class: Trap

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

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Trap

Returns a new instance of Trap.



2
3
4
# File 'lib/david/trap.rb', line 2

def initialize(value)
  @value = value
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



6
7
8
9
# File 'lib/david/trap.rb', line 6

def method_missing(method, *args)
  p method, caller[0]
  @value.send(method, *args)
end