lib/forwardablex.rb
# Forward the name to the named receiver.
#
# @param receiver [Symbol]
#   receiver's name
# @param method [Symbol]
#   method name of the receiver
# @param name [Symbol]
#   forwarder method name
# @param _args [Array<Object>]
#   additional arguments
# @return [void]
Forward the name to the named receiver.
Forward the name to the named receiver .
def forward_named_receiver(receiver, method, name, *_args)
    define_method(name) do |*args, &b|
      instance_variable_get(receiver).__send__(method, *_args, *args, &b)
    end
  end
def forward_named_receiver ( receiver , method , name , * _args ) define_method ( name ) do | * args , & b | instance_variable_get ( receiver ) . __send__ ( method , * _args , * args , & b ) end end
Forward the name to the named receiver.
Forward the name to the named receiver .
None
void
receiver
None
method
method name of the receiver
method name of the receiver
name
forwarder method name
forwarder method name
_args
None