class SideBoom::Stage
Attributes
jobs[R]
name[R]
pipeline[R]
Public Class Methods
new(name)
click to toggle source
# File lib/side_boom/stage.rb, line 9 def initialize(name) @name = name @pipeline = SideBoom::Context.peek @jobs = [] end
Public Instance Methods
job(name, &block)
click to toggle source
# File lib/side_boom/stage.rb, line 15 def job(name, &block) SideBoom::Context.in(self) do new_job = SideBoom::Job.new(name) new_job.instance_eval(&block) if block_given? @jobs << new_job end end
merged_attributes()
click to toggle source
# File lib/side_boom/stage.rb, line 24 def merged_attributes pipeline.attributes.merge(attributes) end
to_hash()
click to toggle source
# File lib/side_boom/stage.rb, line 28 def to_hash @jobs.each_with_object({}) do |job, hash| hash[job.name] = job.to_hash end end