Class: LSP::MarkupContent

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

Overview

export interface MarkupContent

/**
 * The type of the Markup
 */
kind: MarkupKind;
/**
 * The content itself
 */
value: string;

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

#kindObject

type: MarkupKind # type: string



738
739
740
# File 'lib/lsp/lsp_types.rb', line 738

def kind
  @kind
end

#valueObject

type: MarkupKind # type: string



738
739
740
# File 'lib/lsp/lsp_types.rb', line 738

def value
  @value
end

Instance Method Details

#from_h!(value) ⇒ Object



740
741
742
743
744
745
# File 'lib/lsp/lsp_types.rb', line 740

def from_h!(value)
  value = {} if value.nil?
  self.kind = value['kind'] # Unknown type
  self.value = value['value']
  self
end