Class: Retab::BlockTestLifecycleCounts

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_test_runs/block_test_lifecycle_counts.rb

Constant Summary collapse

HASH_ATTRS =
{
  pending: :pending,
  queued: :queued,
  running: :running,
  completed: :completed,
  error: :error,
  cancelled: :cancelled
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ BlockTestLifecycleCounts

Returns a new instance of BlockTestLifecycleCounts.



25
26
27
28
29
30
31
32
33
# File 'lib/retab/workflow_test_runs/block_test_lifecycle_counts.rb', line 25

def initialize(json)
  hash = self.class.normalize(json)
  @pending = hash[:pending]
  @queued = hash[:queued]
  @running = hash[:running]
  @completed = hash[:completed]
  @error = hash[:error]
  @cancelled = hash[:cancelled]
end

Instance Attribute Details

#cancelledObject

Returns the value of attribute cancelled.



17
18
19
# File 'lib/retab/workflow_test_runs/block_test_lifecycle_counts.rb', line 17

def cancelled
  @cancelled
end

#completedObject

Returns the value of attribute completed.



17
18
19
# File 'lib/retab/workflow_test_runs/block_test_lifecycle_counts.rb', line 17

def completed
  @completed
end

#errorObject

Returns the value of attribute error.



17
18
19
# File 'lib/retab/workflow_test_runs/block_test_lifecycle_counts.rb', line 17

def error
  @error
end

#pendingObject

Returns the value of attribute pending.



17
18
19
# File 'lib/retab/workflow_test_runs/block_test_lifecycle_counts.rb', line 17

def pending
  @pending
end

#queuedObject

Returns the value of attribute queued.



17
18
19
# File 'lib/retab/workflow_test_runs/block_test_lifecycle_counts.rb', line 17

def queued
  @queued
end

#runningObject

Returns the value of attribute running.



17
18
19
# File 'lib/retab/workflow_test_runs/block_test_lifecycle_counts.rb', line 17

def running
  @running
end