Class: GOCD::PIPELINE_CONFIG::Pipeline
- Inherits:
-
Object
- Object
- GOCD::PIPELINE_CONFIG::Pipeline
- Includes:
- GOCD::PIPELINE_CONFIG
- Defined in:
- lib/gocd/pipeline_config/pipeline.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#name ⇒ Object
Returns the value of attribute name.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#stages ⇒ Object
readonly
Returns the value of attribute stages.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
- #has_template? ⇒ Boolean
-
#initialize(data) ⇒ Pipeline
constructor
A new instance of Pipeline.
Methods included from GOCD::PIPELINE_CONFIG
#environments, #groups, #pipeline_config_response, #pipelines, #templates, #to_array
Constructor Details
#initialize(data) ⇒ Pipeline
Returns a new instance of Pipeline.
9 10 11 12 13 14 |
# File 'lib/gocd/pipeline_config/pipeline.rb', line 9 def initialize(data) @template = data['@template'] @name = data['@name'] @stages = to_stages(data['stage']) || [] @params = parse_params(data) end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
7 8 9 |
# File 'lib/gocd/pipeline_config/pipeline.rb', line 7 def environment @environment end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/gocd/pipeline_config/pipeline.rb', line 7 def name @name end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/gocd/pipeline_config/pipeline.rb', line 7 def params @params end |
#stages ⇒ Object (readonly)
Returns the value of attribute stages.
7 8 9 |
# File 'lib/gocd/pipeline_config/pipeline.rb', line 7 def stages @stages end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
7 8 9 |
# File 'lib/gocd/pipeline_config/pipeline.rb', line 7 def template @template end |
Instance Method Details
#has_template? ⇒ Boolean
16 17 18 |
# File 'lib/gocd/pipeline_config/pipeline.rb', line 16 def has_template? !template.nil? end |