Display information about a method's parameters
The debugging gem has reached 1.1.0 and now includes a howtocall method:
def function(a, b=1, c: 2, d:,&e) end
howtocall :function #=> function(a, b̲, d:, c̲:̲, &e)
It shows the parameter names used in the method definition, which helps to quickly guess how a method works. This is especially useful when used with methods using Ruby 2.1’s keyword arguments.
Post a comment