Class: Semaph::Model::PipelineCollection

Inherits:
Object
  • Object
show all
Defined in:
lib/semaph/model/pipeline_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workflow) ⇒ PipelineCollection

Returns a new instance of PipelineCollection.



8
9
10
# File 'lib/semaph/model/pipeline_collection.rb', line 8

def initialize(workflow)
  @workflow = workflow
end

Instance Attribute Details

#allObject (readonly)

Returns the value of attribute all.



6
7
8
# File 'lib/semaph/model/pipeline_collection.rb', line 6

def all
  @all
end

Instance Method Details

#reloadObject



12
13
14
15
16
17
# File 'lib/semaph/model/pipeline_collection.rb', line 12

def reload
  project = @workflow.project
  @all = project.client.pipelines({ wf_id: @workflow.id }).map do |content|
    Pipeline.new @workflow, content
  end
end