Class: RactorRailsShim::Callable
- Inherits:
-
Object
- Object
- RactorRailsShim::Callable
- Defined in:
- lib/ractor_rails_shim/patches/callables.rb
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(target, method_name) ⇒ Callable
constructor
A new instance of Callable.
Constructor Details
#initialize(target, method_name) ⇒ Callable
Returns a new instance of Callable.
35 36 37 38 |
# File 'lib/ractor_rails_shim/patches/callables.rb', line 35 def initialize(target, method_name) @target = target @method_name = method_name end |
Instance Method Details
#call(*args) ⇒ Object
39 40 41 |
# File 'lib/ractor_rails_shim/patches/callables.rb', line 39 def call(*args) @target.__send__(@method_name, *args) end |