class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout

end
b)
def foo(a,
# good
end
b)
a,
def foo(
# good
end
)
b
a,
def foo(
# bad
end
)
b
def foo(a,
# bad
@example EnforcedStyle: same_line
end
)
b
a,
def foo(
# good
end
)
b
def foo(a,
# good
end
b)
def foo(a,
# bad
end
b)
a,
def foo(
# bad
@example EnforcedStyle: new_line
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 EnforcedStyle: symmetrical (default)
line as the last parameter of the definition.
The closing brace of a multi-line method definition must be on the same
When using the ‘same_line` style:
after the last parameter of the definition.
The closing brace of a multi-line method definition must be on the line
When using the `new_line` style:
line below the last parameter of the definition.
parameter of the definition, then the closing brace should be on the
If an method definition’s opening brace is on the line above the first
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
When using the ‘symmetrical` (default) style:
on the same line as the last method parameter, or a new line.
This cop checks that the closing brace in a method definition is either

def autocorrect(node)

def autocorrect(node)
  MultilineLiteralBraceCorrector.correct(processed_source, node)
end

def on_def(node)

def on_def(node)
  check_brace_layout(node.arguments)
end