class Liebre::Engine::Builder
Constants
- ACTORS
- CONTEXT
Attributes
actor_classes[R]
bridge[R]
config[R]
context_class[R]
name[R]
opts[R]
type[R]
Public Class Methods
new(bridge, type, name, opts, config, context: CONTEXT, actors: ACTORS)
click to toggle source
# File lib/liebre/engine/builder.rb, line 14 def initialize bridge, type, name, opts, config, context: CONTEXT, actors: ACTORS @bridge = bridge @type = type @name = name @opts = opts @config = config @context_class = context @actor_classes = actors end
Public Instance Methods
call()
click to toggle source
# File lib/liebre/engine/builder.rb, line 25 def call actor_class.new(context) end
Private Instance Methods
actor_class()
click to toggle source
# File lib/liebre/engine/builder.rb, line 31 def actor_class actor_classes.fetch(type) end
chan()
click to toggle source
# File lib/liebre/engine/builder.rb, line 39 def chan bridge.open_channel(opts) end
context()
click to toggle source
# File lib/liebre/engine/builder.rb, line 35 def context context_class.new(chan, name, opts, config) end