Class: Textus::Produce::Engine
- Inherits:
-
Object
- Object
- Textus::Produce::Engine
- Defined in:
- lib/textus/produce/engine.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(container:, call:) ⇒ Engine
constructor
A new instance of Engine.
- #run(keys) ⇒ Object (also: #call)
Constructor Details
#initialize(container:, call:) ⇒ Engine
Returns a new instance of Engine.
8 9 10 11 |
# File 'lib/textus/produce/engine.rb', line 8 def initialize(container:, call:) @container = container @call = call end |
Class Method Details
.converge(container:, call:, keys:) ⇒ Object
4 5 6 |
# File 'lib/textus/produce/engine.rb', line 4 def self.converge(container:, call:, keys:) new(container:, call:).run(keys) end |
Instance Method Details
#run(keys) ⇒ Object Also known as: call
13 14 15 16 17 |
# File 'lib/textus/produce/engine.rb', line 13 def run(keys) results = { completed: [], failed: [] } Array(keys).each { |key| produce_one(key, results) } results end |