lib/language_server/protocol/interface/command.rb in language_server-protocol-3.16.0.3 vs lib/language_server/protocol/interface/command.rb in language_server-protocol-3.17.0.0
- old
+ new
@@ -1,8 +1,14 @@
module LanguageServer
module Protocol
module Interface
+ #
+ # Represents a reference to a command. Provides a title which
+ # will be used to represent a command in the UI and, optionally,
+ # an array of arguments which will be passed to the command handler
+ # function when invoked.
+ #
class Command
def initialize(title:, command:, arguments: nil)
@attributes = {}
@attributes[:title] = title
@@ -30,10 +36,10 @@
#
# Arguments that the command handler should be
# invoked with.
#
- # @return [any[]]
+ # @return [LSPAny[] | nil]
def arguments
attributes.fetch(:arguments)
end
attr_reader :attributes