Class: Lignite::DirectReply

Inherits:
Message
  • Object
show all
Defined in:
lib/lignite/message.rb

Overview

A reply to a DirectCommand

Instance Attribute Summary collapse

Attributes inherited from Message

#body, #type

Instance Method Summary collapse

Methods inherited from Message

#bytes, direct_command_no_reply, direct_command_with_reply, msgid, reply_from_bytes, reset_msgid, system_command_no_reply, system_command_with_reply

Methods included from Bytes

#bin_to_hex, #f32, #hex_to_bin, #u16, #u32, #u8, #unpack_f32, #unpack_u16, #unpack_u32, #unpack_u8

Methods included from Logger

default_logger, #logger

Constructor Details

#initialize(msgid:, error:, body:) ⇒ DirectReply

Returns a new instance of DirectReply.



93
94
95
96
97
# File 'lib/lignite/message.rb', line 93

def initialize(msgid:, error:, body:)
  @msgid = msgid
  @error = error
  @globals = body
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



99
100
101
# File 'lib/lignite/message.rb', line 99

def error
  @error
end

#globalsObject (readonly)

Returns the value of attribute globals.



99
100
101
# File 'lib/lignite/message.rb', line 99

def globals
  @globals
end

#msgidObject (readonly)

Returns the value of attribute msgid.



99
100
101
# File 'lib/lignite/message.rb', line 99

def msgid
  @msgid
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


101
102
103
# File 'lib/lignite/message.rb', line 101

def error?
  @error
end