Class: GOCD::PIPELINE_CONFIG::Stage
- Inherits:
-
Object
- Object
- GOCD::PIPELINE_CONFIG::Stage
- Includes:
- GOCD::PIPELINE_CONFIG
- Defined in:
- lib/gocd/pipeline_config/stage.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#jobs ⇒ Object
readonly
Returns the value of attribute jobs.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pipeline ⇒ Object
Returns the value of attribute pipeline.
Instance Method Summary collapse
-
#initialize(pipeline, data) ⇒ Stage
constructor
A new instance of Stage.
Methods included from GOCD::PIPELINE_CONFIG
#environments, #groups, #pipeline_config_response, #pipelines, #templates, #to_array
Constructor Details
#initialize(pipeline, data) ⇒ Stage
Returns a new instance of Stage.
9 10 11 12 13 |
# File 'lib/gocd/pipeline_config/stage.rb', line 9 def initialize(pipeline, data) @pipeline = pipeline @name = data['@name'] @jobs = data['jobs'].nil? ? [] : to_jobs(data['jobs']['job']) end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
7 8 9 |
# File 'lib/gocd/pipeline_config/stage.rb', line 7 def environment @environment end |
#jobs ⇒ Object (readonly)
Returns the value of attribute jobs.
7 8 9 |
# File 'lib/gocd/pipeline_config/stage.rb', line 7 def jobs @jobs end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/gocd/pipeline_config/stage.rb', line 7 def name @name end |
#pipeline ⇒ Object
Returns the value of attribute pipeline.
7 8 9 |
# File 'lib/gocd/pipeline_config/stage.rb', line 7 def pipeline @pipeline end |