Class: Rafflesia::JobRetryData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::JobRetryData
- Defined in:
- lib/rafflesia/jobs/job_retry_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ row_count: :row_count, tasks: :tasks }.freeze
Instance Attribute Summary collapse
-
#row_count ⇒ Object
Returns the value of attribute row_count.
-
#tasks ⇒ Object
Returns the value of attribute tasks.
Instance Method Summary collapse
-
#initialize(json) ⇒ JobRetryData
constructor
A new instance of JobRetryData.
Constructor Details
#initialize(json) ⇒ JobRetryData
Returns a new instance of JobRetryData.
17 18 19 20 21 22 |
# File 'lib/rafflesia/jobs/job_retry_data.rb', line 17 def initialize(json) super() hash = self.class.normalize(json) @row_count = hash[:row_count] @tasks = (hash[:tasks] || []).map { |item| item ? Rafflesia::JobQueueTask.new(item) : nil } end |
Instance Attribute Details
#row_count ⇒ Object
Returns the value of attribute row_count.
13 14 15 |
# File 'lib/rafflesia/jobs/job_retry_data.rb', line 13 def row_count @row_count end |
#tasks ⇒ Object
Returns the value of attribute tasks.
13 14 15 |
# File 'lib/rafflesia/jobs/job_retry_data.rb', line 13 def tasks @tasks end |