class RuboCop::Cop::Layout::MultilineHashBraceLayout

b: 2 }
{ a: 1,
# good
b: 2 }
a: 1,
{
# good
}
b: 2
a: 1,
{
# bad
}
b: 2
{ a: 1,
# bad
@example EnforcedStyle: same_line
}
b: 2
a: 1,
{
# good
}
b: 2
{ a: 1,
# good
b: 2 }
{ a: 1,
# bad
b: 2 }
a: 1,
{
# bad
@example EnforcedStyle: new_line
}
b: 2
a: 1,
{
# good
b: 2 }
{ a: 1,
# good
b: 2 }
a: 1,
{
# bad
}
b: 2
{ a: 1,
# bad
@example EnforcedStyle: symmetrical (default)
line as the last element of the hash.
The closing brace of a multi-line hash literal must be on the same
When using the ‘same_line` style:
after the last element of the hash.
The closing brace of a multi-line hash literal must be on the line
When using the `new_line` style:
the last element of the hash.
of the hash, then the closing brace should be on the line below
If a hash’s opening brace is on the line above the first element
the last element of the hash.
of the hash, then the closing brace should be on the same line as
If a hash’s opening brace is on the same line as the first element
When using the ‘symmetrical` (default) style:
on the same line as the last hash element, or a new line.
This cop checks that the closing brace in a hash literal is either

def on_hash(node)

def on_hash(node)
  check_brace_layout(node)
end