Without spending several pages trying to explain myself, I have a need
to do something like this:
def method_missing(method_name, *parameters)
@method_name = method_name
@parameters = parameters
end
. . . many lifetimes later:
send(@method_name, @parameters)
This sorta works - except that @parameters is, rather than a
collection of bare parameters, an array containing them, which the
method being called via send() is not expecting. I’m unsure how to
pull all the contents out of @parameters and make each an individual
bare argument to pass in send(), and very importantly, not pass
anything there if @parameters is empty.
Any ideas?
I know this may seem like a weird thing to be trying to do, but it’s
necessary. Trying to explain why I need to do this would literally
take several pages of text. I’m hoping I can avoid the “you shouldn’t
be trying to do this” argument and just figure out a way to do it.
-Bill