Class: LSP::FileSystemWatcher

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

Overview

export interface FileSystemWatcher { /** * The glob pattern to watch. Glob patterns can have the following syntax: * - * to match one or more characters in a path segment * - ? to match on one character in a path segment * - ** to match any number of path segments, including none * - {} to group conditions (e.g. **​/*.{ts,js} matches all TypeScript and JavaScript files) * - [] to declare a range of characters to match in a path segment (e.g., example.[0-9] to match on example.0, example.1, …) * - [!...] to negate a range of characters to match in a path segment (e.g., example.[!0-9] to match on example.a, example.b, but not example.0) / globPattern: string; /* * The kind of events of interest. If omitted it defaults * to WatchKind.Create | WatchKind.Change | WatchKind.Delete * which is 7. */ kind?: number; }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ FileSystemWatcher

Returns a new instance of FileSystemWatcher.



786
787
788
789
# File 'lib/lsp/lsp_protocol.rb', line 786

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[kind]
end

Instance Attribute Details

#globPatternObject

type: string # type: number



784
785
786
# File 'lib/lsp/lsp_protocol.rb', line 784

def globPattern
  @globPattern
end

#kindObject

type: string # type: number



784
785
786
# File 'lib/lsp/lsp_protocol.rb', line 784

def kind
  @kind
end

Instance Method Details

#from_h!(value) ⇒ Object



791
792
793
794
795
796
# File 'lib/lsp/lsp_protocol.rb', line 791

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