Class: Retab::VerdictSummary

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_test_run_results/verdict_summary.rb

Constant Summary collapse

HASH_ATTRS =
{
  result: :result,
  assertions_passed: :assertions_passed,
  assertions_failed: :assertions_failed,
  blocked_assertions: :blocked_assertions,
  failed_assertion_ids: :failed_assertion_ids
}.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) ⇒ VerdictSummary

Returns a new instance of VerdictSummary.



23
24
25
26
27
28
29
30
# File 'lib/retab/workflow_test_run_results/verdict_summary.rb', line 23

def initialize(json)
  hash = self.class.normalize(json)
  @result = hash[:result]
  @assertions_passed = hash[:assertions_passed]
  @assertions_failed = hash[:assertions_failed]
  @blocked_assertions = hash[:blocked_assertions]
  @failed_assertion_ids = (hash[:failed_assertion_ids] || [])
end

Instance Attribute Details

#assertions_failedObject

Returns the value of attribute assertions_failed.



16
17
18
# File 'lib/retab/workflow_test_run_results/verdict_summary.rb', line 16

def assertions_failed
  @assertions_failed
end

#assertions_passedObject

Returns the value of attribute assertions_passed.



16
17
18
# File 'lib/retab/workflow_test_run_results/verdict_summary.rb', line 16

def assertions_passed
  @assertions_passed
end

#blocked_assertionsObject

Returns the value of attribute blocked_assertions.



16
17
18
# File 'lib/retab/workflow_test_run_results/verdict_summary.rb', line 16

def blocked_assertions
  @blocked_assertions
end

#failed_assertion_idsObject

Returns the value of attribute failed_assertion_ids.



16
17
18
# File 'lib/retab/workflow_test_run_results/verdict_summary.rb', line 16

def failed_assertion_ids
  @failed_assertion_ids
end

#resultObject

Returns the value of attribute result.



16
17
18
# File 'lib/retab/workflow_test_run_results/verdict_summary.rb', line 16

def result
  @result
end