Class: Faith::Sequence
- Defined in:
- lib/faith/sequence.rb
Instance Attribute Summary
Attributes inherited from Namespace
Attributes inherited from Task
#action, #dependencies, #mixins, #name, #parent
Instance Method Summary collapse
-
#initialize(name, parent, children, mixins: [], dependencies: []) ⇒ Sequence
constructor
A new instance of Sequence.
Methods inherited from Namespace
Methods inherited from Task
#child, #ensure_all_resolved, #ensure_resolved, #resolve, #resolve_self!, #run
Methods included from Named
Constructor Details
#initialize(name, parent, children, mixins: [], dependencies: []) ⇒ Sequence
Returns a new instance of Sequence.
3 4 5 6 7 8 9 10 11 |
# File 'lib/faith/sequence.rb', line 3 def initialize(name, parent, children, mixins: [], dependencies: []) s = self super(name, parent, children, mixins: mixins, dependencies: dependencies) do |ctx| ctx.output.sequence(s) ctx.output.indent children.each { |child| child.run(ctx) } ctx.output.dedent end end |