Module: MultipleMan::Listener
- Defined in:
- lib/multiple_man/mixins/listener.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#listen_to ⇒ Object
Returns the value of attribute listen_to.
-
#operation ⇒ Object
Returns the value of attribute operation.
Class Method Summary collapse
Instance Method Summary collapse
- #create(payload) ⇒ Object
- #destroy(payload) ⇒ Object
- #routing_key(operation = self.operation) ⇒ Object
- #update(payload) ⇒ Object
Instance Attribute Details
#listen_to ⇒ Object
Returns the value of attribute listen_to.
12 13 14 |
# File 'lib/multiple_man/mixins/listener.rb', line 12 def listen_to @listen_to end |
#operation ⇒ Object
Returns the value of attribute operation.
11 12 13 |
# File 'lib/multiple_man/mixins/listener.rb', line 11 def operation @operation end |
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/multiple_man/mixins/listener.rb', line 3 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#create(payload) ⇒ Object
14 15 16 |
# File 'lib/multiple_man/mixins/listener.rb', line 14 def create(payload) # noop end |
#destroy(payload) ⇒ Object
22 23 24 |
# File 'lib/multiple_man/mixins/listener.rb', line 22 def destroy(payload) # noop end |
#routing_key(operation = self.operation) ⇒ Object
7 8 9 |
# File 'lib/multiple_man/mixins/listener.rb', line 7 def routing_key(operation = self.operation) MultipleMan::RoutingKey.new(listen_to, operation).to_s end |
#update(payload) ⇒ Object
18 19 20 |
# File 'lib/multiple_man/mixins/listener.rb', line 18 def update(payload) # noop end |