Class: Semaph::Model::WorkflowCollection

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ WorkflowCollection

Returns a new instance of WorkflowCollection.



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

def initialize(project)
  @project = project
end

Instance Attribute Details

#allObject (readonly)

Returns the value of attribute all.



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

def all
  @all
end

Instance Method Details

#reloadObject



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

def reload
  @all = @project.client.workflows(@project.id).map do |content|
    Workflow.new @project, content
  end
end