Argument Forwarding
The triple-dot syntax (...
) is used as the argument for a method definition when we want to forward all of our arguments to delegate method.
Not what you're looking for? This is not to be confused with the Exclusive Range syntax (e.g. 1...10
).
Instead of having to manually spell out each piece like so:
def forwarding_method(*x, **y, &block)
delegate_method(*x, **y, &block)
end
we can instead use ...
:
def forwarding_method(...)
delegate_method(...)
end