Class: Semaph::Model::JobCollection
- Inherits:
-
Object
- Object
- Semaph::Model::JobCollection
- Defined in:
- lib/semaph/model/job_collection.rb
Instance Attribute Summary collapse
-
#all ⇒ Object
readonly
Returns the value of attribute all.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#done_at ⇒ Object
readonly
Returns the value of attribute done_at.
-
#pending_at ⇒ Object
readonly
Returns the value of attribute pending_at.
-
#pipeline ⇒ Object
readonly
Returns the value of attribute pipeline.
-
#queuing_at ⇒ Object
readonly
Returns the value of attribute queuing_at.
-
#running_at ⇒ Object
readonly
Returns the value of attribute running_at.
-
#stopping_at ⇒ Object
readonly
Returns the value of attribute stopping_at.
Instance Method Summary collapse
- #failed ⇒ Object
- #incomplete ⇒ Object
-
#initialize(pipeline) ⇒ JobCollection
constructor
A new instance of JobCollection.
- #reload ⇒ Object
Constructor Details
#initialize(pipeline) ⇒ JobCollection
Returns a new instance of JobCollection.
9 10 11 |
# File 'lib/semaph/model/job_collection.rb', line 9 def initialize(pipeline) @pipeline = pipeline end |
Instance Attribute Details
#all ⇒ Object (readonly)
Returns the value of attribute all.
7 8 9 |
# File 'lib/semaph/model/job_collection.rb', line 7 def all @all end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/semaph/model/job_collection.rb', line 7 def created_at @created_at end |
#done_at ⇒ Object (readonly)
Returns the value of attribute done_at.
7 8 9 |
# File 'lib/semaph/model/job_collection.rb', line 7 def done_at @done_at end |
#pending_at ⇒ Object (readonly)
Returns the value of attribute pending_at.
7 8 9 |
# File 'lib/semaph/model/job_collection.rb', line 7 def pending_at @pending_at end |
#pipeline ⇒ Object (readonly)
Returns the value of attribute pipeline.
7 8 9 |
# File 'lib/semaph/model/job_collection.rb', line 7 def pipeline @pipeline end |
#queuing_at ⇒ Object (readonly)
Returns the value of attribute queuing_at.
7 8 9 |
# File 'lib/semaph/model/job_collection.rb', line 7 def queuing_at @queuing_at end |
#running_at ⇒ Object (readonly)
Returns the value of attribute running_at.
7 8 9 |
# File 'lib/semaph/model/job_collection.rb', line 7 def running_at @running_at end |
#stopping_at ⇒ Object (readonly)
Returns the value of attribute stopping_at.
7 8 9 |
# File 'lib/semaph/model/job_collection.rb', line 7 def stopping_at @stopping_at end |
Instance Method Details
#failed ⇒ Object
23 24 25 |
# File 'lib/semaph/model/job_collection.rb', line 23 def failed @all.select(&:failed?) end |
#incomplete ⇒ Object
19 20 21 |
# File 'lib/semaph/model/job_collection.rb', line 19 def incomplete @all.reject(&:finished?) end |
#reload ⇒ Object
13 14 15 16 17 |
# File 'lib/semaph/model/job_collection.rb', line 13 def reload workflow = @pipeline.workflow project = workflow.project @all = parse_content(project.client.pipeline(@pipeline.id)) end |