Class: StopSoundPlaybackReply

Inherits:
DirectCommandReply show all
Defined in:
lib/telegrams/commands/direct/replies/stop_sound_playback_reply.rb

Constant Summary

Constants inherited from Reply

Reply::COMMAND_TYPE, Reply::STATUS_MESSAGES, Reply::SUCCESS

Instance Attribute Summary

Attributes inherited from Reply

#command, #message_bytes, #status, #status_description, #type

Attributes inherited from Telegram

#type

Instance Method Summary collapse

Methods inherited from Reply

#message, #success?

Methods inherited from Telegram

#as_bytes, #max_size_in_bytes

Constructor Details

#initialize(bytes) ⇒ StopSoundPlaybackReply

Returns a new instance of StopSoundPlaybackReply.



4
5
6
# File 'lib/telegrams/commands/direct/replies/stop_sound_playback_reply.rb', line 4

def initialize(bytes)
  super(bytes)
end

Instance Method Details

#validate_bytes(bytes) ⇒ Object

override

Raises:

  • (ArgumentError)


9
10
11
12
# File 'lib/telegrams/commands/direct/replies/stop_sound_playback_reply.rb', line 9

def validate_bytes(bytes)
  super(bytes)
  raise ArgumentError, "must be a reply for a StopSoundPlayback command" unless bytes[1] == 0x0C
end