Class: AMQ::Protocol::Confirm::Select
- Defined in:
- lib/amq/protocol/client.rb
Instance Attribute Summary collapse
-
#nowait ⇒ Object
readonly
Returns the value of attribute nowait.
Class Method Summary collapse
- .decode(data) ⇒ Object
-
.encode(channel, nowait) ⇒ Object
[u’nowait = false’].
- .has_content? ⇒ Boolean
Instance Method Summary collapse
-
#initialize(nowait) ⇒ Select
constructor
A new instance of Select.
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Constructor Details
#initialize(nowait) ⇒ Select
Returns a new instance of Select.
2338 2339 2340 |
# File 'lib/amq/protocol/client.rb', line 2338 def initialize(nowait) @nowait = nowait end |
Instance Attribute Details
#nowait ⇒ Object (readonly)
Returns the value of attribute nowait.
2337 2338 2339 |
# File 'lib/amq/protocol/client.rb', line 2337 def nowait @nowait end |
Class Method Details
.decode(data) ⇒ Object
2329 2330 2331 2332 2333 2334 2335 |
# File 'lib/amq/protocol/client.rb', line 2329 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 bit_buffer = data[offset, 1].unpack(PACK_CHAR).first offset += 1 nowait = (bit_buffer & (1 << 0)) != 0 self.new(nowait) end |
.encode(channel, nowait) ⇒ Object
- u’nowait = false’
2348 2349 2350 2351 2352 2353 2354 |
# File 'lib/amq/protocol/client.rb', line 2348 def self.encode(channel, nowait) buffer = @packed_indexes.dup bit_buffer = 0 bit_buffer = bit_buffer | (1 << 0) if nowait buffer << [bit_buffer].pack(PACK_CHAR) MethodFrame.new(buffer, channel) end |
.has_content? ⇒ Boolean
2342 2343 2344 |
# File 'lib/amq/protocol/client.rb', line 2342 def self.has_content? false end |