Class: PhaseShift::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/phase_shift/runner.rb

Overview

Run a defined pipeline

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pipeline) ⇒ Runner



8
9
10
# File 'lib/phase_shift/runner.rb', line 8

def initialize(pipeline)
  @options = { pipeline: pipeline }
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/phase_shift/runner.rb', line 6

def options
  @options
end

Instance Method Details

#pipelineObject



16
17
18
# File 'lib/phase_shift/runner.rb', line 16

def pipeline
  @pipeline ||= Builder.parse_file "#{options[:pipeline]}.rb"
end

#runObject



12
13
14
# File 'lib/phase_shift/runner.rb', line 12

def run
  pipeline.call
end