Class: MessageDriver::Middleware::Base
- Inherits:
-
Object
- Object
- MessageDriver::Middleware::Base
- Defined in:
- lib/message_driver/middleware/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Base
constructor
A new instance of Base.
- #on_consume(body, headers, properties) ⇒ Object
- #on_publish(body, headers, properties) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/message_driver/middleware/base.rb', line 6 def initialize(*args) @destination = args.shift end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
4 5 6 |
# File 'lib/message_driver/middleware/base.rb', line 4 def destination @destination end |
Instance Method Details
#on_consume(body, headers, properties) ⇒ Object
14 15 16 |
# File 'lib/message_driver/middleware/base.rb', line 14 def on_consume(body, headers, properties) [body, headers, properties] end |
#on_publish(body, headers, properties) ⇒ Object
10 11 12 |
# File 'lib/message_driver/middleware/base.rb', line 10 def on_publish(body, headers, properties) [body, headers, properties] end |