class LanguageServer::Protocol::Interface::Command

Attributes

attributes[R]

Public Class Methods

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

  @attributes[:title] = title
  @attributes[:command] = command
  @attributes[:arguments] = arguments if arguments

  @attributes.freeze
end

Public Instance Methods

arguments() click to toggle source

Arguments that the command handler should be invoked with.

@return [any

# File lib/language_server/protocol/interface/command.rb, line 36
def arguments
  attributes.fetch(:arguments)
end
command() click to toggle source

The identifier of the actual command handler.

@return [string]

# File lib/language_server/protocol/interface/command.rb, line 27
def command
  attributes.fetch(:command)
end
title() click to toggle source

Title of the command, like `save`.

@return [string]

# File lib/language_server/protocol/interface/command.rb, line 19
def title
  attributes.fetch(:title)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/command.rb, line 42
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/command.rb, line 46
def to_json(*args)
  to_hash.to_json(*args)
end