What does the ampersand at the end of a Ruby parameter mean?

Viewed 652

Below is an example of named arguments in Ruby, but what does the ampersand do?

def set_tools(foo:, bar:, baz:)
    @instance_variable = baz&.stuff
1 Answers
Related