Class: AMQ::Protocol::Queue::PurgeOk

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(message_count) ⇒ PurgeOk

Returns a new instance of PurgeOk.



1150
1151
1152
# File 'lib/amq/protocol/client.rb', line 1150

def initialize(message_count)
  @message_count = message_count
end

Instance Attribute Details

#message_countObject (readonly)

Returns the value of attribute message_count.



1149
1150
1151
# File 'lib/amq/protocol/client.rb', line 1149

def message_count
  @message_count
end

Class Method Details

.decode(data) ⇒ Object

Returns:



1142
1143
1144
1145
1146
1147
# File 'lib/amq/protocol/client.rb', line 1142

def self.decode(data)
  offset = 0
  message_count = data[offset, 4].unpack(PACK_UINT32).first
  offset += 4
  self.new(message_count)
end

.has_content?Boolean

Returns:

  • (Boolean)


1154
1155
1156
# File 'lib/amq/protocol/client.rb', line 1154

def self.has_content?
  false
end