Class: DSP::Request
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 # type: number # type: string.
-
#command ⇒ Object
type: string # type: any # type: number # type: string.
-
#seq ⇒ Object
type: string # type: any # type: number # type: string.
-
#type ⇒ Object
type: string # type: any # type: number # type: string.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ Request
constructor
A new instance of Request.
Methods inherited from DSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ Request
Returns a new instance of Request.
40 41 42 43 |
# File 'lib/dsp/dsp_protocol.rb', line 40 def initialize(initial_hash = nil) super @optional_method_names = %i[arguments] end |
Instance Attribute Details
#arguments ⇒ Object
type: string # type: any # type: number # type: string
38 39 40 |
# File 'lib/dsp/dsp_protocol.rb', line 38 def arguments @arguments end |
#command ⇒ Object
type: string # type: any # type: number # type: string
38 39 40 |
# File 'lib/dsp/dsp_protocol.rb', line 38 def command @command end |
#seq ⇒ Object
type: string # type: any # type: number # type: string
38 39 40 |
# File 'lib/dsp/dsp_protocol.rb', line 38 def seq @seq end |
#type ⇒ Object
type: string # type: any # type: number # type: string
38 39 40 |
# File 'lib/dsp/dsp_protocol.rb', line 38 def type @type end |
Instance Method Details
#from_h!(value) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/dsp/dsp_protocol.rb', line 45 def from_h!(value) value = {} if value.nil? self.command = value['command'] self.arguments = value['arguments'] self.seq = value['seq'] self.type = value['type'] self end |