123456789_123456789_123456789_123456789_123456789_

Module: RuboCop::Cop::SymbolHelp

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/rubocop/cop/mixin/symbol_help.rb

Overview

Classes that include this module just implement functions for working with symbol nodes.

Instance Method Summary

Instance Method Details

#hash_key?(node) ⇒ Boolean

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/symbol_help.rb', line 8

def hash_key?(node)
  node.parent&.pair_type? && node == node.parent.child_nodes.first
end