class LanguageServer::Protocol::Interface::FileSystemWatcher

Attributes

attributes[R]

Public Class Methods

new(glob_pattern:, kind: nil) click to toggle source
# File lib/language_server/protocol/interface/file_system_watcher.rb, line 5
def initialize(glob_pattern:, kind: nil)
  @attributes = {}

  @attributes[:globPattern] = glob_pattern
  @attributes[:kind] = kind if kind

  @attributes.freeze
end

Public Instance Methods

glob_pattern() click to toggle source

The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail.

@return [GlobPattern]

# File lib/language_server/protocol/interface/file_system_watcher.rb, line 19
def glob_pattern
  attributes.fetch(:globPattern)
end
kind() click to toggle source

The kind of events of interest. If omitted it defaults to WatchKind.Create | WatchKind.Change | WatchKind.Delete which is 7.

@return [number]

# File lib/language_server/protocol/interface/file_system_watcher.rb, line 29
def kind
  attributes.fetch(:kind)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/file_system_watcher.rb, line 35
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/file_system_watcher.rb, line 39
def to_json(*args)
  to_hash.to_json(*args)
end