Class: Liebre::Actor::Publisher

Inherits:
Object
  • Object
show all
Includes:
Concurrent::Async
Defined in:
lib/liebre/actor/publisher.rb,
lib/liebre/actor/publisher/core.rb,
lib/liebre/actor/publisher/reporter.rb,
lib/liebre/actor/publisher/resources.rb

Defined Under Namespace

Classes: Core, Reporter, Resources

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Publisher

Returns a new instance of Publisher.



12
13
14
15
16
# File 'lib/liebre/actor/publisher.rb', line 12

def initialize context
  super()

  @context = context
end

Instance Method Details

#__clean__Object



36
37
38
# File 'lib/liebre/actor/publisher.rb', line 36

def __clean__
  reporter.on_clean { core.clean() }
end

#__publish__(payload, opts) ⇒ Object



32
33
34
# File 'lib/liebre/actor/publisher.rb', line 32

def __publish__ payload, opts
  reporter.on_publish { core.publish(payload, opts) }
end

#__start__Object



25
26
27
# File 'lib/liebre/actor/publisher.rb', line 25

def __start__
  reporter.on_start { core.start }
end

#__stop__Object



28
29
30
# File 'lib/liebre/actor/publisher.rb', line 28

def __stop__
  reporter.on_stop { core.stop }
end

#cleanObject



23
# File 'lib/liebre/actor/publisher.rb', line 23

def clean() async.__clean__(); end

#publish(payload, opts = {}) ⇒ Object



21
# File 'lib/liebre/actor/publisher.rb', line 21

def publish(payload, opts = {}) async.__publish__(payload, opts); end

#startObject



18
# File 'lib/liebre/actor/publisher.rb', line 18

def start() async.__start__(); end

#stopObject



19
# File 'lib/liebre/actor/publisher.rb', line 19

def stop()  async.__stop__();  end