Class: Retab::WorkflowTestRunTiming

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

Constant Summary collapse

HASH_ATTRS =
{
  created_at: :created_at,
  started_at: :started_at,
  completed_at: :completed_at,
  duration_ms: :duration_ms
}.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) ⇒ WorkflowTestRunTiming

Returns a new instance of WorkflowTestRunTiming.



21
22
23
24
25
26
27
# File 'lib/retab/workflow_test_runs/workflow_test_run_timing.rb', line 21

def initialize(json)
  hash = self.class.normalize(json)
  @created_at = hash[:created_at]
  @started_at = hash[:started_at]
  @completed_at = hash[:completed_at]
  @duration_ms = hash[:duration_ms]
end

Instance Attribute Details

#completed_atObject

Returns the value of attribute completed_at.



15
16
17
# File 'lib/retab/workflow_test_runs/workflow_test_run_timing.rb', line 15

def completed_at
  @completed_at
end

#created_atObject

Returns the value of attribute created_at.



15
16
17
# File 'lib/retab/workflow_test_runs/workflow_test_run_timing.rb', line 15

def created_at
  @created_at
end

#duration_msObject

Returns the value of attribute duration_ms.



15
16
17
# File 'lib/retab/workflow_test_runs/workflow_test_run_timing.rb', line 15

def duration_ms
  @duration_ms
end

#started_atObject

Returns the value of attribute started_at.



15
16
17
# File 'lib/retab/workflow_test_runs/workflow_test_run_timing.rb', line 15

def started_at
  @started_at
end