Class: Deliver::SyncScreenshots::UploadResult
- Inherits:
-
Object
- Object
- Deliver::SyncScreenshots::UploadResult
- Defined in:
- deliver/lib/deliver/sync_screenshots.rb
Instance Attribute Summary collapse
-
#asset_delivery_state_counts ⇒ Object
readonly
Returns the value of attribute asset_delivery_state_counts.
-
#failing_screenshots ⇒ Object
readonly
Returns the value of attribute failing_screenshots.
Instance Method Summary collapse
-
#initialize(asset_delivery_state_counts:, failing_screenshots:) ⇒ UploadResult
constructor
A new instance of UploadResult.
- #processing? ⇒ Boolean
- #screenshot_count ⇒ Object
Constructor Details
#initialize(asset_delivery_state_counts:, failing_screenshots:) ⇒ UploadResult
Returns a new instance of UploadResult.
18 19 20 21 |
# File 'deliver/lib/deliver/sync_screenshots.rb', line 18 def initialize(asset_delivery_state_counts:, failing_screenshots:) @asset_delivery_state_counts = asset_delivery_state_counts @failing_screenshots = failing_screenshots end |
Instance Attribute Details
#asset_delivery_state_counts ⇒ Object (readonly)
Returns the value of attribute asset_delivery_state_counts.
16 17 18 |
# File 'deliver/lib/deliver/sync_screenshots.rb', line 16 def asset_delivery_state_counts @asset_delivery_state_counts end |
#failing_screenshots ⇒ Object (readonly)
Returns the value of attribute failing_screenshots.
16 17 18 |
# File 'deliver/lib/deliver/sync_screenshots.rb', line 16 def failing_screenshots @failing_screenshots end |
Instance Method Details
#processing? ⇒ Boolean
23 24 25 |
# File 'deliver/lib/deliver/sync_screenshots.rb', line 23 def processing? @asset_delivery_state_counts.fetch('UPLOAD_COMPLETE', 0) > 0 end |
#screenshot_count ⇒ Object
27 28 29 |
# File 'deliver/lib/deliver/sync_screenshots.rb', line 27 def screenshot_count @asset_delivery_state_counts.fetch('COMPLETE', 0) end |