class RuboCop::Cop::Style::TrailingComma

def multiline?(node)

closing bracket is on its own line.
on different lines, and each item within is on its own line, and the
Returns true if the round/square/curly brackets of the given node are
def multiline?(node)
  elements = if node.type == :send
               _receiver, _method_name, *args = *node
               args
             else
               node.children
             end
  items = [*elements.map { |e| e.loc.expression }, node.loc.end]
  items.each_cons(2) { |a, b| return false if on_same_line?(a, b) }
  true
end