Class: LSP::FoldingRange
- Defined in:
- lib/lsp/lsp_types.rb,
lib/lsp/lsp_protocol_foldingrange.rb
Overview
export interface FoldingRange
/**
* The zero-based line number from where the folded range starts.
*/
startLine: number;
/**
* The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
*/
startCharacter?: number;
/**
* The zero-based line number where the folded range ends.
*/
endLine: number;
/**
* The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
*/
endCharacter?: number;
/**
* Describes the kind of the folding range such as `comment' or 'region'. The kind
* is used to categorize folding ranges and used by commands like 'Fold all comments'. See
* [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
*/
kind?: string;
Instance Attribute Summary collapse
-
#endCharacter ⇒ Object
type: number # type: number # type: number # type: number # type: string.
-
#endLine ⇒ Object
type: number # type: number # type: number # type: number # type: string.
-
#kind ⇒ Object
type: number # type: number # type: number # type: number # type: string.
-
#startCharacter ⇒ Object
type: number # type: number # type: number # type: number # type: string.
-
#startLine ⇒ Object
type: number # type: number # type: number # type: number # type: string.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ FoldingRange
constructor
A new instance of FoldingRange.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ FoldingRange
Returns a new instance of FoldingRange.
233 234 235 236 |
# File 'lib/lsp/lsp_types.rb', line 233 def initialize(initial_hash = nil) super @optional_method_names = %i[startCharacter endCharacter kind] end |
Instance Attribute Details
#endCharacter ⇒ Object
type: number # type: number # type: number # type: number # type: string
231 232 233 |
# File 'lib/lsp/lsp_types.rb', line 231 def endCharacter @endCharacter end |
#endLine ⇒ Object
type: number # type: number # type: number # type: number # type: string
231 232 233 |
# File 'lib/lsp/lsp_types.rb', line 231 def endLine @endLine end |
#kind ⇒ Object
type: number # type: number # type: number # type: number # type: string
231 232 233 |
# File 'lib/lsp/lsp_types.rb', line 231 def kind @kind end |
#startCharacter ⇒ Object
type: number # type: number # type: number # type: number # type: string
231 232 233 |
# File 'lib/lsp/lsp_types.rb', line 231 def startCharacter @startCharacter end |
#startLine ⇒ Object
type: number # type: number # type: number # type: number # type: string
231 232 233 |
# File 'lib/lsp/lsp_types.rb', line 231 def startLine @startLine end |
Instance Method Details
#from_h!(value) ⇒ Object
238 239 240 241 242 243 244 245 246 |
# File 'lib/lsp/lsp_types.rb', line 238 def from_h!(value) value = {} if value.nil? self.startLine = value['startLine'] self.startCharacter = value['startCharacter'] self.endLine = value['endLine'] self.endCharacter = value['endCharacter'] self.kind = value['kind'] self end |