Class: AMQ::Protocol::Channel::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(channel_id) ⇒ OpenOk

Returns a new instance of OpenOk.



699
700
701
# File 'lib/amq/protocol/client.rb', line 699

def initialize(channel_id)
  @channel_id = channel_id
end

Instance Attribute Details

#channel_idObject (readonly)

Returns the value of attribute channel_id.



698
699
700
# File 'lib/amq/protocol/client.rb', line 698

def channel_id
  @channel_id
end

Class Method Details

.decode(data) ⇒ Object

Returns:



689
690
691
692
693
694
695
696
# File 'lib/amq/protocol/client.rb', line 689

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, 4].unpack(PACK_UINT32).first
  offset += 4
  channel_id = data[offset, length]
  offset += length
  self.new(channel_id)
end

.has_content?Boolean

Returns:

  • (Boolean)


703
704
705
# File 'lib/amq/protocol/client.rb', line 703

def self.has_content?
  false
end