Class: RabbitMQ::FFI::BasicReturn Private
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- RabbitMQ::FFI::BasicReturn
- Defined in:
- lib/rabbitmq/ffi/gen/basic_return.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .id ⇒ Object private
Instance Method Summary collapse
- #apply(reply_code: nil, reply_text: nil, exchange: nil, routing_key: nil) ⇒ Object private
- #free! ⇒ Object private
- #id ⇒ Object private
- #to_h(free = false) ⇒ Object private
Class Method Details
.id ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/rabbitmq/ffi/gen/basic_return.rb', line 12 def self.id :basic_return end |
Instance Method Details
#apply(reply_code: nil, reply_text: nil, exchange: nil, routing_key: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 24 25 26 |
# File 'lib/rabbitmq/ffi/gen/basic_return.rb', line 20 def apply(reply_code: nil, reply_text: nil, exchange: nil, routing_key: nil) self[:reply_code] = Integer(reply_code) if reply_code self[:reply_text] = Bytes.from_s(reply_text.to_s) if reply_text self[:exchange] = Bytes.from_s(exchange.to_s) if exchange self[:routing_key] = Bytes.from_s(routing_key.to_s) if routing_key self end |
#free! ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 40 41 |
# File 'lib/rabbitmq/ffi/gen/basic_return.rb', line 37 def free! self[:reply_text].free! self[:exchange].free! self[:routing_key].free! end |
#id ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/rabbitmq/ffi/gen/basic_return.rb', line 16 def id :basic_return end |
#to_h(free = false) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 31 32 33 34 35 |
# File 'lib/rabbitmq/ffi/gen/basic_return.rb', line 28 def to_h(free=false) { reply_code: self[:reply_code], reply_text: self[:reply_text].to_s(free), exchange: self[:exchange].to_s(free), routing_key: self[:routing_key].to_s(free) } end |