Class: Railjet::Listener
- Inherits:
-
Object
- Object
- Railjet::Listener
- Includes:
- Util::UseCaseHelper
- Defined in:
- lib/railjet/bus.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#around_listener(event, **kwargs) {|kwargs| ... } ⇒ Object
This around block does nothing but it’s there as point of extensions so it could be easily overridden in sub-class if some additional setup is needed.
Class Method Details
.listen_to(event, &block) ⇒ Object
52 53 54 55 |
# File 'lib/railjet/bus.rb', line 52 def listen_to(event, &block) subscriptions << event define_listeners(event, &block) end |
.sidekiq_options(options = {}) ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/railjet/bus.rb', line 57 def ( = {}) if .present? self. = self..merge(.stringify_keys) else self. end end |
.subscriptions ⇒ Object
48 49 50 |
# File 'lib/railjet/bus.rb', line 48 def subscriptions @subscriptions ||= [] end |
Instance Method Details
#around_listener(event, **kwargs) {|kwargs| ... } ⇒ Object
This around block does nothing but it’s there as point of extensions so it could be easily overridden in sub-class if some additional setup is needed
93 94 95 |
# File 'lib/railjet/bus.rb', line 93 def around_listener(event, **kwargs) yield(**kwargs) end |