J
Jeff Cohen
Is there a way to reflect on a method to get the declard names of the
parameters?
class Equipment
def install(tool, packaging)
end
end
I can do this:
m = Equipment.new.methodinstall)
m.arity # => 2
I want to somehow find out that the client code has declared the
parameters named 'tool' and 'packaging'.
Is this possible somehow? I feel like it should be, but I can't quite
figure it out.
Thanks!
Jeff
parameters?
class Equipment
def install(tool, packaging)
end
end
I can do this:
m = Equipment.new.methodinstall)
m.arity # => 2
I want to somehow find out that the client code has declared the
parameters named 'tool' and 'packaging'.
Is this possible somehow? I feel like it should be, but I can't quite
figure it out.
Thanks!
Jeff