Class: Retab::UsageBlockRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::UsageBlockRecord
- Defined in:
- lib/retab/usage/usage_block_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ block_id: :block_id, block_type: :block_type, credits: :credits, execution_count: :execution_count, first_activity_at: :first_activity_at, last_activity_at: :last_activity_at, page_count: :page_count, run_count: :run_count, status_counts: :status_counts, workflow_id: :workflow_id }.freeze
Instance Attribute Summary collapse
-
#block_id ⇒ Object
Returns the value of attribute block_id.
-
#block_type ⇒ Object
Returns the value of attribute block_type.
-
#credits ⇒ Object
Returns the value of attribute credits.
-
#execution_count ⇒ Object
Returns the value of attribute execution_count.
-
#first_activity_at ⇒ Object
Returns the value of attribute first_activity_at.
-
#last_activity_at ⇒ Object
Returns the value of attribute last_activity_at.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
-
#run_count ⇒ Object
Returns the value of attribute run_count.
-
#status_counts ⇒ Object
Returns the value of attribute status_counts.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ UsageBlockRecord
constructor
A new instance of UsageBlockRecord.
Constructor Details
#initialize(json) ⇒ UsageBlockRecord
Returns a new instance of UsageBlockRecord.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/retab/usage/usage_block_record.rb', line 34 def initialize(json) super() hash = self.class.normalize(json) @block_id = hash[:block_id] @block_type = hash[:block_type] @credits = hash[:credits] @execution_count = hash[:execution_count] @first_activity_at = hash[:first_activity_at] @last_activity_at = hash[:last_activity_at] @page_count = hash[:page_count] @run_count = hash[:run_count] @status_counts = hash[:status_counts] || {} @workflow_id = hash[:workflow_id] end |
Instance Attribute Details
#block_id ⇒ Object
Returns the value of attribute block_id.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def block_id @block_id end |
#block_type ⇒ Object
Returns the value of attribute block_type.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def block_type @block_type end |
#credits ⇒ Object
Returns the value of attribute credits.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def credits @credits end |
#execution_count ⇒ Object
Returns the value of attribute execution_count.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def execution_count @execution_count end |
#first_activity_at ⇒ Object
Returns the value of attribute first_activity_at.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def first_activity_at @first_activity_at end |
#last_activity_at ⇒ Object
Returns the value of attribute last_activity_at.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def last_activity_at @last_activity_at end |
#page_count ⇒ Object
Returns the value of attribute page_count.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def page_count @page_count end |
#run_count ⇒ Object
Returns the value of attribute run_count.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def run_count @run_count end |
#status_counts ⇒ Object
Returns the value of attribute status_counts.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def status_counts @status_counts end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
21 22 23 |
# File 'lib/retab/usage/usage_block_record.rb', line 21 def workflow_id @workflow_id end |