Class: Rucoa::Handlers::TextDocumentDocumentHighlightHandler::NodeToHighlightsMappers::WhileMapper

Inherits:
Base
  • Object
show all
Defined in:
lib/rucoa/handlers/text_document_document_highlight_handler.rb

Instance Method Summary collapse

Methods inherited from Base

call, #initialize

Constructor Details

This class inherits a constructor from Rucoa::Handlers::TextDocumentDocumentHighlightHandler::NodeToHighlightsMappers::Base

Instance Method Details

#callArray

Returns:

  • (Array)


517
518
519
520
521
522
523
524
525
526
# File 'lib/rucoa/handlers/text_document_document_highlight_handler.rb', line 517

def call
  return [] if @node.modifier?

  [
    @node.location.keyword,
    @node.location.end
  ].map do |parser_range|
    Highlights::TextHighlight.new(parser_range: parser_range)
  end
end