Class: JenkinsJob::BuildStep::Phase

Inherits:
BasicObject
Defined in:
lib/rubyjobbuilderdsl/buildstep/phase.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Phase



6
7
8
9
# File 'lib/rubyjobbuilderdsl/buildstep/phase.rb', line 6

def initialize(name)
  @name = name
  @jobs_ = []
end

Instance Attribute Details

#jobs_Object (readonly)

Returns the value of attribute jobs_.



4
5
6
# File 'lib/rubyjobbuilderdsl/buildstep/phase.rb', line 4

def jobs_
  @jobs_
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/rubyjobbuilderdsl/buildstep/phase.rb', line 4

def name
  @name
end

Instance Method Details

#job(name, &block) ⇒ Object



11
12
13
14
15
16
# File 'lib/rubyjobbuilderdsl/buildstep/phase.rb', line 11

def job(name, &block)
  job = PhaseJob.new(name)
  job.instance_eval(&block) if block

  @jobs_ << job
end