Class: PhaseShift::Runner
- Inherits:
-
Object
- Object
- PhaseShift::Runner
- Defined in:
- lib/phase_shift/runner.rb
Overview
Run a defined pipeline
Instance Method Summary collapse
- #default_options ⇒ Object
-
#initialize(options = nil) ⇒ Runner
constructor
A new instance of Runner.
- #options ⇒ Object
- #pipeline ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(options = nil) ⇒ Runner
Returns a new instance of Runner.
6 7 8 9 |
# File 'lib/phase_shift/runner.rb', line 6 def initialize( = nil) fail 'No specified pipeline' unless .include? :pipeline @options = end |
Instance Method Details
#default_options ⇒ Object
23 24 25 |
# File 'lib/phase_shift/runner.rb', line 23 def {} end |
#options ⇒ Object
19 20 21 |
# File 'lib/phase_shift/runner.rb', line 19 def @options ||= (ARGV) end |
#pipeline ⇒ Object
15 16 17 |
# File 'lib/phase_shift/runner.rb', line 15 def pipeline @pipeline ||= Builder.parse_file "#{[:pipeline]}.rb" end |
#run ⇒ Object
11 12 13 |
# File 'lib/phase_shift/runner.rb', line 11 def run pipeline.call end |