Method: Parser::Source::Comment::Associator#associate_by_identity

Defined in:
lib/parser/source/comment/associator.rb

#associate_by_identityHash<Parser::Source::Node, Array<Parser::Source::Comment>>

Same as #associate, but compares by identity, thus producing an unambiguous result even in presence of equal nodes.

Returns:

API:

  • public



115
116
117
118
# File 'lib/parser/source/comment/associator.rb', line 115

def associate_by_identity
  @map_using = :identity
  do_associate
end