Class: LSP::Location

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

Overview

export interface Location

uri: DocumentUri;
range: Range;

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

#rangeObject

type: DocumentUri # type: Range



66
67
68
# File 'lib/lsp/lsp_types.rb', line 66

def range
  @range
end

#uriObject

type: DocumentUri # type: Range



66
67
68
# File 'lib/lsp/lsp_types.rb', line 66

def uri
  @uri
end

Instance Method Details

#from_h!(value) ⇒ Object



68
69
70
71
72
73
# File 'lib/lsp/lsp_types.rb', line 68

def from_h!(value)
  value = {} if value.nil?
  self.uri = value['uri'] # Unknown type
  self.range = Range.new(value['range']) unless value['range'].nil?
  self
end