Class: Lignite::DirectReply

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

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, system_command_no_reply, system_command_with_reply

Methods included from Bytes

#f32, #hexdump, #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.



88
89
90
91
92
# File 'lib/lignite/message.rb', line 88

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

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



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

def error
  @error
end

#globalsObject (readonly)

Returns the value of attribute globals.



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

def globals
  @globals
end

#msgidObject (readonly)

Returns the value of attribute msgid.



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

def msgid
  @msgid
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


96
97
98
# File 'lib/lignite/message.rb', line 96

def error?
  @error
end