module RuboCop::Cop::TrailingComma
def elements(node)
def elements(node) return node.children unless node.send_type? _receiver, _method_name, *args = *node args.flat_map do |a| # For each argument, if it is a multi-line hash without braces, # then promote the hash elements to method arguments # for the purpose of determining multi-line-ness. if a.hash_type? && a.multiline? && !a.braces? a.children else a end end end