Class: Crisp::NativeCallInvoker
- Inherits:
-
Object
- Object
- Crisp::NativeCallInvoker
- Defined in:
- lib/crisp/native_call_invoker.rb
Overview
class for handling native ruby method invokations
Instance Method Summary collapse
-
#initialize(target, method, *args) ⇒ NativeCallInvoker
constructor
create instance with target object, method to be called and arguments.
-
#invoke! ⇒ Object
invoke the native ruby call.
Constructor Details
#initialize(target, method, *args) ⇒ NativeCallInvoker
create instance with target object, method to be called and arguments
5 6 7 8 9 |
# File 'lib/crisp/native_call_invoker.rb', line 5 def initialize(target, method, *args) @target = target @method = method @args = args.flatten end |
Instance Method Details
#invoke! ⇒ Object
invoke the native ruby call
12 13 14 |
# File 'lib/crisp/native_call_invoker.rb', line 12 def invoke! @target.send(@method, *@args) end |