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