Class: Trap
- Inherits:
-
Object
- Object
- Trap
- Defined in:
- lib/david/trap.rb
Instance Method Summary collapse
-
#initialize(value) ⇒ Trap
constructor
A new instance of Trap.
- #method_missing(method, *args) ⇒ Object
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 |