Class: LSP::CodeLens
Overview
export interface CodeLens
/**
* The range in which this code lens is valid. Should only span a single line.
*/
range: Range;
/**
* The command this code lens represents.
*/
command?: Command;
/**
* An data entry field that is preserved on a code lens item between
* a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest]
* (#CodeLensResolveRequest)
*/
data?: any;
Instance Attribute Summary collapse
-
#command ⇒ Object
type: Range # type: Command # type: any.
-
#data ⇒ Object
type: Range # type: Command # type: any.
-
#range ⇒ Object
type: Range # type: Command # type: any.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ CodeLens
constructor
A new instance of CodeLens.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ CodeLens
Returns a new instance of CodeLens.
1286 1287 1288 1289 |
# File 'lib/lsp/lsp_types.rb', line 1286 def initialize(initial_hash = nil) super @optional_method_names = i[command data] end |
Instance Attribute Details
#command ⇒ Object
type: Range # type: Command # type: any
1284 1285 1286 |
# File 'lib/lsp/lsp_types.rb', line 1284 def command @command end |
#data ⇒ Object
type: Range # type: Command # type: any
1284 1285 1286 |
# File 'lib/lsp/lsp_types.rb', line 1284 def data @data end |
#range ⇒ Object
type: Range # type: Command # type: any
1284 1285 1286 |
# File 'lib/lsp/lsp_types.rb', line 1284 def range @range end |
Instance Method Details
#from_h!(value) ⇒ Object
1291 1292 1293 1294 1295 1296 1297 |
# File 'lib/lsp/lsp_types.rb', line 1291 def from_h!(value) value = {} if value.nil? self.range = Range.new(value['range']) unless value['range'].nil? self.command = Command.new(value['command']) unless value['command'].nil? self.data = value['data'] self end |