Class: RactorRailsShim::Callable

Inherits:
Object
  • Object
show all
Defined in:
lib/ractor_rails_shim/patches/callables.rb

Instance Method Summary collapse

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