Class: LSP::FileSystemWatcher
- 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
-
#globPattern ⇒ Object
type: string # type: number.
-
#kind ⇒ Object
type: string # type: number.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ FileSystemWatcher
constructor
A new instance of FileSystemWatcher.
Methods inherited from LSPBase
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
#globPattern ⇒ Object
type: string # type: number
784 785 786 |
# File 'lib/lsp/lsp_protocol.rb', line 784 def globPattern @globPattern end |
#kind ⇒ Object
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 |