Class: Chickadee::MessageBus::Subscriber
- Inherits:
-
Object
- Object
- Chickadee::MessageBus::Subscriber
- Defined in:
- lib/chickadee/message_bus.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(id, &block) ⇒ Subscriber
constructor
A new instance of Subscriber.
Constructor Details
#initialize(id, &block) ⇒ Subscriber
Returns a new instance of Subscriber.
22 23 24 25 |
# File 'lib/chickadee/message_bus.rb', line 22 def initialize(id, &block) @id = id @block = block end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
20 21 22 |
# File 'lib/chickadee/message_bus.rb', line 20 def id @id end |
Instance Method Details
#call(*args) ⇒ Object
27 28 29 |
# File 'lib/chickadee/message_bus.rb', line 27 def call(*args) @block.call(*args) end |