← Back to Ruby Operators

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.

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

References