Class: RabbitMQ::FFI::BasicCancel Private

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



10
11
12
# File 'lib/rabbitmq/ffi/gen/basic_cancel.rb', line 10

def self.id
  :basic_cancel
end

Instance Method Details

#apply(consumer_tag: 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.



18
19
20
21
22
# File 'lib/rabbitmq/ffi/gen/basic_cancel.rb', line 18

def apply(consumer_tag: nil, nowait: nil)
  self[:consumer_tag] = Bytes.from_s(consumer_tag.to_s) if consumer_tag
  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.



31
32
33
# File 'lib/rabbitmq/ffi/gen/basic_cancel.rb', line 31

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



14
15
16
# File 'lib/rabbitmq/ffi/gen/basic_cancel.rb', line 14

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



24
25
26
27
28
29
# File 'lib/rabbitmq/ffi/gen/basic_cancel.rb', line 24

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