class RuboCop::Cop::Layout::MultilineArrayLineBreaks


)]
bar
[a, b, foo(
# good
@example AllowMultilineFinalElement: true
)]
bar
[a, b, foo(
# bad
@example AllowMultilineFinalElement: false (default)
]
)
bar
foo(
b,
a,
[
# good
]
c
b,
a,
[
# good
]
c
a, b,
[
# bad
@example
starts on a separate line.
Ensures that each item in a multi-line array

def ignore_last_element?

def ignore_last_element?
  !!cop_config['AllowMultilineFinalElement']
end

def on_array(node)

def on_array(node)
  check_line_breaks(node, node.children, ignore_last: ignore_last_element?)
end