Class: Deliver::SyncScreenshots::UploadResult

Inherits:
Object
  • Object
show all
Defined in:
deliver/lib/deliver/sync_screenshots.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_countsObject (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_screenshotsObject (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

Returns:



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_countObject



27
28
29
# File 'deliver/lib/deliver/sync_screenshots.rb', line 27

def screenshot_count
  @asset_delivery_state_counts.fetch('COMPLETE', 0)
end