Class: JenkinsJob::BuildStep::Phase
- Inherits:
- BasicObject
- Defined in:
- lib/rubyjobbuilderdsl/buildstep/phase.rb
Instance Attribute Summary collapse
-
#jobs_ ⇒ Object
readonly
Returns the value of attribute jobs_.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Phase
constructor
A new instance of Phase.
- #job(name, &block) ⇒ Object
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 |
#name ⇒ Object (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 |