Class: AMQ::Protocol::Basic::CreditOk
- Defined in:
- lib/amq/protocol/client.rb
Instance Attribute Summary collapse
-
#available ⇒ Object
readonly
Returns the value of attribute available.
Class Method Summary collapse
- .decode(data) ⇒ Object
-
.encode(channel, available) ⇒ Object
[u’available = nil’].
- .has_content? ⇒ Boolean
Instance Method Summary collapse
-
#initialize(available) ⇒ CreditOk
constructor
A new instance of CreditOk.
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Constructor Details
#initialize(available) ⇒ CreditOk
Returns a new instance of CreditOk.
2231 2232 2233 |
# File 'lib/amq/protocol/client.rb', line 2231 def initialize(available) @available = available end |
Instance Attribute Details
#available ⇒ Object (readonly)
Returns the value of attribute available.
2230 2231 2232 |
# File 'lib/amq/protocol/client.rb', line 2230 def available @available end |
Class Method Details
.decode(data) ⇒ Object
2223 2224 2225 2226 2227 2228 |
# File 'lib/amq/protocol/client.rb', line 2223 def self.decode(data) offset = 0 available = data[offset, 4].unpack(PACK_UINT32).first offset += 4 self.new(available) end |
.encode(channel, available) ⇒ Object
- u’available = nil’
2241 2242 2243 2244 2245 2246 |
# File 'lib/amq/protocol/client.rb', line 2241 def self.encode(channel, available) buffer = '' buffer << @packed_indexes buffer << [available].pack(PACK_UINT32) MethodFrame.new(buffer, channel) end |
.has_content? ⇒ Boolean
2235 2236 2237 |
# File 'lib/amq/protocol/client.rb', line 2235 def self.has_content? false end |