Class: AMQ::Protocol::Connection::OpenOk

Inherits:
Method
  • Object
show all
Defined in:
lib/amq/protocol/client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Method

encode_body, index, inherited, instantiate, method_id, methods, name, split_headers

Constructor Details

#initialize(known_hosts) ⇒ OpenOk

Returns a new instance of OpenOk.



424
425
426
# File 'lib/amq/protocol/client.rb', line 424

def initialize(known_hosts)
  @known_hosts = known_hosts
end

Instance Attribute Details

#known_hostsObject (readonly)

Returns the value of attribute known_hosts.



423
424
425
# File 'lib/amq/protocol/client.rb', line 423

def known_hosts
  @known_hosts
end

Class Method Details

.decode(data) ⇒ Object

Returns:



414
415
416
417
418
419
420
421
# File 'lib/amq/protocol/client.rb', line 414

def self.decode(data)
  offset = offset = 0 # self-assigning offset to eliminate "assigned but unused variable" warning even if offset is not used in this method
  length = data[offset, 1].unpack(PACK_CHAR).first
  offset += 1
  known_hosts = data[offset, length]
  offset += length
  self.new(known_hosts)
end

.has_content?Boolean

Returns:

  • (Boolean)


428
429
430
# File 'lib/amq/protocol/client.rb', line 428

def self.has_content?
  false
end