module RuboCop::Cop::HashNode

Common functionality for checking hash nodes.

Public Instance Methods

any_pairs_on_the_same_line?(node) click to toggle source
# File lib/rubocop/cop/mixin/hash_node.rb, line 7
def any_pairs_on_the_same_line?(node)
  node.children.butfirst.any? do |pair|
    !Util.begins_its_line?(pair.loc.expression)
  end
end