Class: LSP::Range

Inherits:
LSPBase show all
Defined in:
lib/lsp/lsp_types.rb

Overview

export interface Range { /** * The range's start position / start: Position; /* * The range's end position. */ end: Position; }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from LSP::LSPBase

Instance Attribute Details

#endObject

type: Position # type: Position



51
52
53
# File 'lib/lsp/lsp_types.rb', line 51

def end
  @end
end

#startObject

type: Position # type: Position



51
52
53
# File 'lib/lsp/lsp_types.rb', line 51

def start
  @start
end

Instance Method Details

#from_h!(value) ⇒ Object



53
54
55
56
57
58
# File 'lib/lsp/lsp_types.rb', line 53

def from_h!(value)
  value = {} if value.nil?
  self.start = Position.new(value['start']) unless value['start'].nil?
  self.end = Position.new(value['end']) unless value['end'].nil?
  self
end