class RuboCop::Cop::Style::MultilineMethodDefinitionBraceLayout
end
)
b
a,
def foo(
#good
end
b)
def foo(a,
# good
end
b)
a,
def foo(
# bad
end
)
b
def foo(a,
# bad
@example
be on the line after the last parameter of the definition.
the first parameter of the definition, then the closing brace should
If a method definition’s opening brace is on a separate line from
on the same line as the last parameter of the definition.
first parameter of the definition, then the closing brace should be
If a method definition’s opening brace is on the same line as the
parameters.
symmetrical with respect to the opening brace and the method
This cop checks that the closing brace in a method definition is
def on_method_def(_node, _method_name, args, _body)
def on_method_def(_node, _method_name, args, _body) check_brace_layout(args) end