This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/lib/backup_restore_v2/backup/upload_stats.rb
2023-01-13 00:20:33 +01:00

28 lines
643 B
Ruby

# frozen_string_literal: true
module BackupRestoreV2
module Backup
class UploadStats
attr_accessor :total_count, :included_count, :missing_count
def initialize(total_count: 0, included_count: 0, missing_count: 0)
@total_count = total_count
@included_count = included_count
@missing_count = missing_count
end
def as_json(options = {})
{
total_count: @total_count,
included_count: @included_count,
missing_count: @missing_count,
}
end
def to_json(*options)
as_json(*options).to_json(*options)
end
end
end
end