Class: Rucoa::Handlers::TextDocumentDocumentHighlightHandler::NodeToHighlightsMappers::AnyMapper
- Inherits:
-
Base
- Object
- Base
- Rucoa::Handlers::TextDocumentDocumentHighlightHandler::NodeToHighlightsMappers::AnyMapper
show all
- Defined in:
- lib/rucoa/handlers/text_document_document_highlight_handler.rb
Instance Method Summary
collapse
Methods inherited from Base
call, #initialize
Instance Method Details
#call ⇒ Array
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
# File 'lib/rucoa/handlers/text_document_document_highlight_handler.rb', line 99
def call
case @node
when Nodes::BeginNode, Nodes::BlockNode
BeginMapper.call(@node)
when Nodes::CaseNode
CaseMapper.call(@node)
when Nodes::ClassNode, Nodes::ModuleNode
ModuleMapper.call(@node)
when Nodes::CvarNode, Nodes::CvasgnNode
ClassVariableMapper.call(@node)
when Nodes::DefNode
DefMapper.call(@node)
when Nodes::EnsureNode, Nodes::ResbodyNode, Nodes::RescueNode, Nodes::WhenNode
AnyMapper.call(@node.parent)
when Nodes::ForNode
ForMapper.call(@node)
when Nodes::GvarNode, Nodes::GvasgnNode
GlobalVariableMapper.call(@node)
when Nodes::IfNode
IfMapper.call(@node)
when Nodes::IvarNode, Nodes::IvasgnNode
InstanceVariableMapper.call(@node)
when Nodes::ArgNode, Nodes::LvarNode, Nodes::LvasgnNode
LocalVariableMapper.call(@node)
when Nodes::SendNode
SendMapper.call(@node)
when Nodes::UntilNode, Nodes::WhileNode
WhileMapper.call(@node)
else
[]
end
end
|