Class: EventBus::Listeners::Base
- Inherits:
-
Object
- Object
- EventBus::Listeners::Base
- Defined in:
- lib/event_bus/listeners/base.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(channel) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(channel) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/event_bus/listeners/base.rb', line 6 def initialize(channel) @channel = channel end |
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
4 5 6 |
# File 'lib/event_bus/listeners/base.rb', line 4 def channel @channel end |
Class Method Details
.bind(method, event_name) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/event_bus/listeners/base.rb', line 10 def self.bind(method, event_name) Manager.register_listener_configuration({ listener_class: self, method: method, routing_key: event_name }) end |