Class: GOCD::PIPELINE_CONFIG::Stage

Inherits:
Object
  • Object
show all
Includes:
GOCD::PIPELINE_CONFIG
Defined in:
lib/gocd/pipeline_config/stage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#environmentObject

Returns the value of attribute environment.



7
8
9
# File 'lib/gocd/pipeline_config/stage.rb', line 7

def environment
  @environment
end

#jobsObject (readonly)

Returns the value of attribute jobs.



7
8
9
# File 'lib/gocd/pipeline_config/stage.rb', line 7

def jobs
  @jobs
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/gocd/pipeline_config/stage.rb', line 7

def name
  @name
end

#pipelineObject

Returns the value of attribute pipeline.



7
8
9
# File 'lib/gocd/pipeline_config/stage.rb', line 7

def pipeline
  @pipeline
end