Hello,
Does anyone know if there is a way to access the names of the parameters passed in ruby blocks?
E.g.
def do_something()
# method uses the names of the parameters passed to the block
# in addition to their values
# e.g. the strings "i" and "j"
end
do_something { |i, j| ... }
It's a requirement for a dsl I'm writing, and quite an unusual use case. This is probably possible with something like parsetree, I just wondered if there was an easier/cheekier way.
Thanks