Module: AMQP::Entity Abstract
Overview
This module is abstract.
Note:
Exchanges and queues implementation is based on this class.
AMQ entities, as implemented by AMQP, have callbacks and can run them when necessary.
Constant Summary
Constants included from Openable
Instance Attribute Summary collapse
- #callbacks ⇒ Array<#call> readonly
Attributes included from Openable
Instance Method Summary collapse
Methods included from Callbacks
#clear_callbacks, #define_callback, #exec_callback, #exec_callback_once, #exec_callback_once_yielding_self, #exec_callback_yielding_self, #has_callback?, #prepend_callback, #redefine_callback
Methods included from Openable
#closed!, #closed?, #closing!, #closing?, #opened!, #opened?, #opening!, #opening?
Instance Attribute Details
#callbacks ⇒ Array<#call> (readonly)
50 51 52 |
# File 'lib/amqp/entity.rb', line 50 def callbacks @callbacks end |
Instance Method Details
#initialize(connection) ⇒ Object
53 54 55 56 57 58 |
# File 'lib/amqp/entity.rb', line 53 def initialize(connection) @connection = connection # Be careful with default values for #ruby hashes: h = Hash.new(Array.new); h[:key] ||= 1 # won't assign anything to :key. MK. @callbacks = Hash.new end |