Class: LSP::SelectionRange
Overview
export interface SelectionRange
/**
* The [range](#Range) of this selection range.
*/
range: Range;
/**
* The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
*/
parent?: SelectionRange;
Instance Attribute Summary collapse
-
#parent ⇒ Object
type: Range # type: SelectionRange.
-
#range ⇒ Object
type: Range # type: SelectionRange.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ SelectionRange
constructor
A new instance of SelectionRange.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ SelectionRange
Returns a new instance of SelectionRange.
1407 1408 1409 1410 |
# File 'lib/lsp/lsp_types.rb', line 1407 def initialize(initial_hash = nil) super @optional_method_names = %i[parent] end |
Instance Attribute Details
#parent ⇒ Object
type: Range # type: SelectionRange
1405 1406 1407 |
# File 'lib/lsp/lsp_types.rb', line 1405 def parent @parent end |
#range ⇒ Object
type: Range # type: SelectionRange
1405 1406 1407 |
# File 'lib/lsp/lsp_types.rb', line 1405 def range @range end |
Instance Method Details
#from_h!(value) ⇒ Object
1412 1413 1414 1415 1416 1417 |
# File 'lib/lsp/lsp_types.rb', line 1412 def from_h!(value) value = {} if value.nil? self.range = Range.new(value['range']) unless value['range'].nil? self.parent = SelectionRange.new(value['parent']) unless value['parent'].nil? self end |