Class: PhaseShift::Runner
- Inherits:
-
Object
- Object
- PhaseShift::Runner
- Defined in:
- lib/phase_shift/runner.rb
Overview
Run a defined pipeline
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(pipeline) ⇒ Runner
constructor
A new instance of Runner.
- #pipeline ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(pipeline) ⇒ Runner
8 9 10 |
# File 'lib/phase_shift/runner.rb', line 8 def initialize(pipeline) = { pipeline: pipeline } end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/phase_shift/runner.rb', line 6 def end |
Instance Method Details
#pipeline ⇒ Object
16 17 18 |
# File 'lib/phase_shift/runner.rb', line 16 def pipeline @pipeline ||= Builder.parse_file "#{options[:pipeline]}.rb" end |
#run ⇒ Object
12 13 14 |
# File 'lib/phase_shift/runner.rb', line 12 def run pipeline.call end |