Pattern: Use of options hash
Issue: -
This rule checks for options hashes and discourages them if the current Ruby version supports keyword arguments.
Instead of:
def fry(options = {})
temperature = options.fetch(:temperature, 300)
...
end
Prefer:
def fry(temperature: 300)
...
end
Attribute | Value |
---|---|
SuspiciousParamNames | options, opts, args, params, parameters |