Class: Rucoa::Handlers::TextDocumentSelectionRangeHandler::SelectionRangeProvider::NodeToRangesMapper
- Inherits:
-
Object
- Object
- Rucoa::Handlers::TextDocumentSelectionRangeHandler::SelectionRangeProvider::NodeToRangesMapper
- Defined in:
- lib/rucoa/handlers/text_document_selection_range_handler.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Array<Rucoa::Range>
-
#initialize(node) ⇒ NodeToRangesMapper
constructor
A new instance of NodeToRangesMapper.
Constructor Details
#initialize(node) ⇒ NodeToRangesMapper
Returns a new instance of NodeToRangesMapper.
102 103 104 |
# File 'lib/rucoa/handlers/text_document_selection_range_handler.rb', line 102 def initialize(node) @node = node end |
Class Method Details
.call(node) ⇒ Array<Rucoa::Range>
96 97 98 |
# File 'lib/rucoa/handlers/text_document_selection_range_handler.rb', line 96 def call(node) new(node).call end |
Instance Method Details
#call ⇒ Array<Rucoa::Range>
107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/rucoa/handlers/text_document_selection_range_handler.rb', line 107 def call case @node when Nodes::StrNode [ inner_range, expression_range ] else [ expression_range ] end end |