Class: RabbitMQ::FFI::QueueUnbind Private

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/rabbitmq/ffi/gen/queue_unbind.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

Instance Method Summary collapse

Class Method Details

.idObject

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.



13
14
15
# File 'lib/rabbitmq/ffi/gen/queue_unbind.rb', line 13

def self.id
  :queue_unbind
end

Instance Method Details

#apply(ticket: nil, queue: nil, exchange: nil, routing_key: nil, arguments: 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.



21
22
23
24
25
26
27
28
# File 'lib/rabbitmq/ffi/gen/queue_unbind.rb', line 21

def apply(ticket: nil, queue: nil, exchange: nil, routing_key: nil, arguments: nil)
  self[:ticket] = Integer(ticket) if ticket
  self[:queue] = Bytes.from_s(queue.to_s) if queue
  self[:exchange] = Bytes.from_s(exchange.to_s) if exchange
  self[:routing_key] = Bytes.from_s(routing_key.to_s) if routing_key
  self[:arguments] = Table.from(arguments) if arguments
  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.



40
41
42
43
44
45
# File 'lib/rabbitmq/ffi/gen/queue_unbind.rb', line 40

def free!
  self[:queue].free!
  self[:exchange].free!
  self[:routing_key].free!
  self[:arguments].free!
end

#idObject

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.



17
18
19
# File 'lib/rabbitmq/ffi/gen/queue_unbind.rb', line 17

def id
  :queue_unbind
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.



30
31
32
33
34
35
36
37
38
# File 'lib/rabbitmq/ffi/gen/queue_unbind.rb', line 30

def to_h(free=false)
  {
    ticket: self[:ticket],
    queue: self[:queue].to_s(free),
    exchange: self[:exchange].to_s(free),
    routing_key: self[:routing_key].to_s(free),
    arguments: self[:arguments].to_h(free)
  }
end