Class: SetInputModeReply

Inherits:
DirectCommandReply show all
Defined in:
lib/telegrams/commands/direct/replies/set_input_mode_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) ⇒ SetInputModeReply

Returns a new instance of SetInputModeReply.



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

def initialize(bytes)
	super(bytes)
end

Instance Method Details

#validate_bytes(bytes) ⇒ Object

Raises:

  • (ArgumentError)


8
9
10
# File 'lib/telegrams/commands/direct/replies/set_input_mode_reply.rb', line 8

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