Class: Stove::Runner
- Inherits:
-
Object
- Object
- Stove::Runner
- Includes:
- Logify, Mixin::Instanceable, Mixin::Optionable
- Defined in:
- lib/stove/runner.rb
Instance Attribute Summary collapse
-
#cookbook ⇒ Object
readonly
Returns the value of attribute cookbook.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#validations ⇒ Object
readonly
Returns the value of attribute validations.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Runner
constructor
A new instance of Runner.
- #run(cookbook, options = {}) ⇒ Object
Methods included from Mixin::Optionable
Methods included from Mixin::Instanceable
Constructor Details
#initialize ⇒ Runner
Returns a new instance of Runner.
28 29 30 |
# File 'lib/stove/runner.rb', line 28 def initialize @validations = [] end |
Instance Attribute Details
#cookbook ⇒ Object (readonly)
Returns the value of attribute cookbook.
14 15 16 |
# File 'lib/stove/runner.rb', line 14 def cookbook @cookbook end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
15 16 17 |
# File 'lib/stove/runner.rb', line 15 def end |
#validations ⇒ Object (readonly)
Returns the value of attribute validations.
16 17 18 |
# File 'lib/stove/runner.rb', line 16 def validations @validations end |
Class Method Details
.action(id) ⇒ Object
8 9 10 11 |
# File 'lib/stove/runner.rb', line 8 def action(id) actions << id filters[id] = { before: [], after: [] } end |
Instance Method Details
#run(cookbook, options = {}) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/stove/runner.rb', line 32 def run(cookbook, = {}) @cookbook, = cookbook, run_validations run_actions end |