Class: RabbitMQ::FFI::ChannelOpenOk Private

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



7
8
9
# File 'lib/rabbitmq/ffi/gen/channel_open_ok.rb', line 7

def self.id
  :channel_open_ok
end

Instance Method Details

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



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

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



24
25
26
# File 'lib/rabbitmq/ffi/gen/channel_open_ok.rb', line 24

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



11
12
13
# File 'lib/rabbitmq/ffi/gen/channel_open_ok.rb', line 11

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



20
21
22
# File 'lib/rabbitmq/ffi/gen/channel_open_ok.rb', line 20

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