Class: GOCD::PIPELINE_CONFIG::Job

Inherits:
Object
  • Object
show all
Includes:
GOCD::PIPELINE_CONFIG
Defined in:
lib/gocd/pipeline_config/job.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, 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

#environmentObject

Returns the value of attribute environment.



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

def environment
  @environment
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#pipelineObject

Returns the value of attribute pipeline.



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

def pipeline
  @pipeline
end

#resourcesObject (readonly)

Returns the value of attribute resources.



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

def resources
  @resources
end

#stageObject (readonly)

Returns the value of attribute stage.



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

def stage
  @stage
end