Class: RabbitMQ::FFI::ExchangeDelete Private

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



12
13
14
# File 'lib/rabbitmq/ffi/gen/exchange_delete.rb', line 12

def self.id
  :exchange_delete
end

Instance Method Details

#apply(ticket: nil, exchange: nil, if_unused: nil, nowait: 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/exchange_delete.rb', line 20

def apply(ticket: nil, exchange: nil, if_unused: nil, nowait: nil)
  self[:ticket] = Integer(ticket) if ticket
  self[:exchange] = Bytes.from_s(exchange.to_s) if exchange
  self[:if_unused] = if_unused unless if_unused.nil?
  self[:nowait] = nowait unless nowait.nil?
  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
# File 'lib/rabbitmq/ffi/gen/exchange_delete.rb', line 37

def free!
  self[:exchange].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.



16
17
18
# File 'lib/rabbitmq/ffi/gen/exchange_delete.rb', line 16

def id
  :exchange_delete
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/exchange_delete.rb', line 28

def to_h(free=false)
  {
    ticket: self[:ticket],
    exchange: self[:exchange].to_s(free),
    if_unused: self[:if_unused],
    nowait: self[:nowait]
  }
end