Class: Liebre::Actor::Publisher::Core
- Inherits:
-
Object
- Object
- Liebre::Actor::Publisher::Core
- Defined in:
- lib/liebre/actor/publisher/core.rb
Instance Method Summary collapse
- #clean ⇒ Object
-
#initialize(resources, context) ⇒ Core
constructor
A new instance of Core.
- #publish(payload, opts) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(resources, context) ⇒ Core
Returns a new instance of Core.
6 7 8 9 |
# File 'lib/liebre/actor/publisher/core.rb', line 6 def initialize resources, context @resources = resources @context = context end |
Instance Method Details
#clean ⇒ Object
23 24 25 |
# File 'lib/liebre/actor/publisher/core.rb', line 23 def clean exchange.delete end |
#publish(payload, opts) ⇒ Object
19 20 21 |
# File 'lib/liebre/actor/publisher/core.rb', line 19 def publish payload, opts exchange.publish(payload, opts) end |
#start ⇒ Object
11 12 13 |
# File 'lib/liebre/actor/publisher/core.rb', line 11 def start exchange end |
#stop ⇒ Object
15 16 17 |
# File 'lib/liebre/actor/publisher/core.rb', line 15 def stop chan.close end |