Class: Conquer::Scroller
Defined Under Namespace
Classes: Worker
Constant Summary collapse
- DEFAULT_OPTIONS =
{ speed: 1, width: 20, every: 0, step: 2 }.freeze
Instance Attribute Summary
Attributes inherited from Container
Instance Method Summary collapse
-
#initialize(topic, options) ⇒ Scroller
constructor
A new instance of Scroller.
- #start_worker ⇒ Object
Methods inherited from Container
Constructor Details
#initialize(topic, options) ⇒ Scroller
Returns a new instance of Scroller.
57 58 59 60 |
# File 'lib/conquer/scroller.rb', line 57 def initialize(topic, ) super(topic) @options = DEFAULT_OPTIONS.merge() end |
Instance Method Details
#start_worker ⇒ Object
62 63 64 65 |
# File 'lib/conquer/scroller.rb', line 62 def start_worker Worker.supervise(args: [@topic, @children.keys, @options]) @children.values.each(&:start_worker) end |