Class: Semaph::Model::PromotionCollection
- Inherits:
-
Object
- Object
- Semaph::Model::PromotionCollection
- Defined in:
- lib/semaph/model/promotion_collection.rb
Instance Attribute Summary collapse
-
#all ⇒ Object
readonly
Returns the value of attribute all.
-
#pipeline ⇒ Object
readonly
Returns the value of attribute pipeline.
Instance Method Summary collapse
-
#initialize(pipeline) ⇒ PromotionCollection
constructor
A new instance of PromotionCollection.
- #reload ⇒ Object
Constructor Details
#initialize(pipeline) ⇒ PromotionCollection
Returns a new instance of PromotionCollection.
8 9 10 |
# File 'lib/semaph/model/promotion_collection.rb', line 8 def initialize(pipeline) @pipeline = pipeline end |
Instance Attribute Details
#all ⇒ Object (readonly)
Returns the value of attribute all.
6 7 8 |
# File 'lib/semaph/model/promotion_collection.rb', line 6 def all @all end |
#pipeline ⇒ Object (readonly)
Returns the value of attribute pipeline.
6 7 8 |
# File 'lib/semaph/model/promotion_collection.rb', line 6 def pipeline @pipeline end |
Instance Method Details
#reload ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/semaph/model/promotion_collection.rb', line 12 def reload workflow = @pipeline.workflow project = workflow.project @all = project.client.promotions(@pipeline.id).map do |promotion_response| Promotion.new(@pipeline, promotion_response) end end |