Class: Kame::Remocon::Opal::Turtle::Forwarder
- Inherits:
-
Object
- Object
- Kame::Remocon::Opal::Turtle::Forwarder
- Defined in:
- lib/kame/remocon/opal/turtle.rb
Instance Method Summary collapse
-
#initialize(obj, *methods, &hook) ⇒ Forwarder
constructor
A new instance of Forwarder.
Constructor Details
#initialize(obj, *methods, &hook) ⇒ Forwarder
Returns a new instance of Forwarder.
53 54 55 56 57 58 59 60 |
# File 'lib/kame/remocon/opal/turtle.rb', line 53 def initialize(obj, *methods, &hook) methods.each do |name| define_singleton_method(name) do |*args| obj.method(name).call(*args) hook.call end end end |