class RuboCop::AST::HashNode

def pairs_on_same_line?

Returns:
  • (Boolean) - whether any `pair` nodes are on the same line

Other tags:
    Note: - `kwsplat` nodes are ignored.
    Note: - A multiline `pair` is considered to be on the same line if it
def pairs_on_same_line?
  pairs.each_cons(2).any? { |first, second| first.same_line?(second) }
end