Class: Waffle::Base
- Inherits:
-
Object
- Object
- Waffle::Base
- Defined in:
- lib/waffle/base.rb
Instance Method Summary collapse
-
#initialize(transport = nil) ⇒ Base
constructor
A new instance of Base.
- #publish(flow = 'events', message = '') ⇒ Object
- #subscribe(flow = '', &block) ⇒ Object
Constructor Details
#initialize(transport = nil) ⇒ Base
Returns a new instance of Base.
4 5 6 |
# File 'lib/waffle/base.rb', line 4 def initialize(transport = nil) @transport = transport end |
Instance Method Details
#publish(flow = 'events', message = '') ⇒ Object
8 9 10 |
# File 'lib/waffle/base.rb', line 8 def publish(flow = 'events', = '') @transport.publish flow, end |
#subscribe(flow = '', &block) ⇒ Object
12 13 14 |
# File 'lib/waffle/base.rb', line 12 def subscribe(flow = '', &block) @transport.subscribe flow, &block end |