Class: PuppetEditorServices::Protocol::DebugAdapterMessages::Request
- Inherits:
-
ProtocolMessage
- Object
- ProtocolMessage
- PuppetEditorServices::Protocol::DebugAdapterMessages::Request
- Defined in:
- lib/puppet_editor_services/protocol/debug_adapter_messages.rb
Overview
interface Request extends ProtocolMessage {
/** The command to execute. */
command: string;
/** Object containing arguments for the command. */
arguments?: any;
}
Instance Attribute Summary collapse
-
#arguments ⇒ Object
type: string # type: any.
-
#command ⇒ Object
type: string # type: any.
Attributes inherited from ProtocolMessage
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ Request
constructor
A new instance of Request.
- #to_h ⇒ Object
Methods inherited from ProtocolMessage
Constructor Details
#initialize(initial_hash = nil) ⇒ Request
Returns a new instance of Request.
50 51 52 53 |
# File 'lib/puppet_editor_services/protocol/debug_adapter_messages.rb', line 50 def initialize(initial_hash = nil) super self.type = 'request' end |
Instance Attribute Details
#arguments ⇒ Object
type: string # type: any
48 49 50 |
# File 'lib/puppet_editor_services/protocol/debug_adapter_messages.rb', line 48 def arguments @arguments end |
#command ⇒ Object
type: string # type: any
48 49 50 |
# File 'lib/puppet_editor_services/protocol/debug_adapter_messages.rb', line 48 def command @command end |
Instance Method Details
#from_h!(value) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/puppet_editor_services/protocol/debug_adapter_messages.rb', line 55 def from_h!(value) value = {} if value.nil? super self.command = value['command'] self.arguments = value['arguments'] self end |
#to_h ⇒ Object
63 64 65 66 67 68 |
# File 'lib/puppet_editor_services/protocol/debug_adapter_messages.rb', line 63 def to_h super.tap do |hash| hash['command'] = command hash['arguments'] = arguments unless arguments.nil? end end |