Class: Rucoa::Handlers::TextDocumentDocumentHighlightHandler::NodeToHighlightsMappers::InstanceVariableMapper

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)


311
312
313
314
315
316
317
318
319
320
# File 'lib/rucoa/handlers/text_document_document_highlight_handler.rb', line 311

def call
  nodes.map do |node|
    case node
    when Nodes::IvarNode
      Highlights::ReadHighlight
    when Nodes::IvasgnNode
      Highlights::WriteHighlight
    end.new(parser_range: node.location.name)
  end
end