Class: LSP::SignatureInformation
- Defined in:
- lib/lsp/lsp_types.rb
Overview
export interface SignatureInformation
/**
* The label of this signature. Will be shown in
* the UI.
*/
label: string;
/**
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation?: string | MarkupContent;
/**
* The parameters of this signature.
*/
parameters?: ParameterInformation[];
Instance Attribute Summary collapse
-
#documentation ⇒ Object
type: string # type: string | MarkupContent # type: ParameterInformation[].
-
#label ⇒ Object
type: string # type: string | MarkupContent # type: ParameterInformation[].
-
#parameters ⇒ Object
type: string # type: string | MarkupContent # type: ParameterInformation[].
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ SignatureInformation
constructor
A new instance of SignatureInformation.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ SignatureInformation
Returns a new instance of SignatureInformation.
987 988 989 990 |
# File 'lib/lsp/lsp_types.rb', line 987 def initialize(initial_hash = nil) super @optional_method_names = %i[documentation parameters] end |
Instance Attribute Details
#documentation ⇒ Object
type: string # type: string | MarkupContent # type: ParameterInformation[]
985 986 987 |
# File 'lib/lsp/lsp_types.rb', line 985 def documentation @documentation end |
#label ⇒ Object
type: string # type: string | MarkupContent # type: ParameterInformation[]
985 986 987 |
# File 'lib/lsp/lsp_types.rb', line 985 def label @label end |
#parameters ⇒ Object
type: string # type: string | MarkupContent # type: ParameterInformation[]
985 986 987 |
# File 'lib/lsp/lsp_types.rb', line 985 def parameters @parameters end |
Instance Method Details
#from_h!(value) ⇒ Object
992 993 994 995 996 997 998 |
# File 'lib/lsp/lsp_types.rb', line 992 def from_h!(value) value = {} if value.nil? self.label = value['label'] self.documentation = value['documentation'] # Unknown type self.parameters = to_typed_aray(value['parameters'], ParameterInformation) self end |