lib/dap/request.rb in ruby-dap-0.1.2 vs lib/dap/request.rb in ruby-dap-0.1.3
- old
+ new
@@ -35,15 +35,19 @@
require_relative 'completions_arguments'
require_relative 'exception_info_arguments'
require_relative 'read_memory_arguments'
require_relative 'disassemble_arguments'
+# A client or debug adapter initiated request.
class DAP::Request < DAP::ProtocolMessage
+ # (see ProtocolMessage#type)
def self.type
'request'
end
+ # Allowed request commands and their arguments types.
+ # @return [Hash<Symbol, Class>]
def self.arguments
@arguments ||= one_of(
cancel: DAP::CancelArguments,
runInTerminal: DAP::RunInTerminalRequestArguments,
initialize: DAP::InitializeRequestArguments,
@@ -87,8 +91,11 @@
readMemory: DAP::ReadMemoryArguments,
disassemble: DAP::DisassembleArguments,
)
end
+ # The command to execute.
property :command
+
+ # Object containing arguments for the command.
property :arguments, as: arguments.with(:command)
end