Class: Retab::WorkflowTest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowTest
- Defined in:
- lib/retab/workflow_tests/workflow_test.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, workflow_id: :workflow_id, target: :target, source: :source, name: :name, assertion: :assertion, assertion_schema_dep: :assertion_schema_dep, assertion_drift_status: :assertion_drift_status, schema_drift: :schema_drift, schema_drift_detail: :schema_drift_detail, validation_status: :validation_status, validation_issues: :validation_issues, latest_run_summary: :latest_run_summary, latest_passing_run_summary: :latest_passing_run_summary, latest_failing_run_summary: :latest_failing_run_summary, created_at: :created_at, updated_at: :updated_at }.freeze
Instance Attribute Summary collapse
-
#assertion ⇒ Object
Returns the value of attribute assertion.
-
#assertion_drift_status ⇒ Object
Returns the value of attribute assertion_drift_status.
-
#assertion_schema_dep ⇒ Object
Returns the value of attribute assertion_schema_dep.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#latest_failing_run_summary ⇒ Object
Returns the value of attribute latest_failing_run_summary.
-
#latest_passing_run_summary ⇒ Object
Returns the value of attribute latest_passing_run_summary.
-
#latest_run_summary ⇒ Object
Returns the value of attribute latest_run_summary.
-
#name ⇒ Object
Returns the value of attribute name.
-
#schema_drift ⇒ Object
Returns the value of attribute schema_drift.
-
#schema_drift_detail ⇒ Object
Returns the value of attribute schema_drift_detail.
-
#source ⇒ Object
Returns the value of attribute source.
-
#target ⇒ Object
Returns the value of attribute target.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#validation_issues ⇒ Object
Returns the value of attribute validation_issues.
-
#validation_status ⇒ Object
Returns the value of attribute validation_status.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowTest
constructor
A new instance of WorkflowTest.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowTest
Returns a new instance of WorkflowTest.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 48 def initialize(json) super() hash = self.class.normalize(json) @id = hash[:id] @workflow_id = hash[:workflow_id] @target = hash[:target] ? Retab::WorkflowTestBlockTarget.new(hash[:target]) : nil @source = hash[:source] ? ( case hash[:source][:type] when "manual" Retab::ManualWorkflowTestSource.new(hash[:source]) when "run_step" Retab::RunStepWorkflowTestSource.new(hash[:source]) else hash[:source] end ) : nil @name = hash[:name] @assertion = hash[:assertion] ? Retab::AssertionSpec.new(hash[:assertion]) : nil @assertion_schema_dep = hash[:assertion_schema_dep] ? Retab::AssertionSchemaDep.new(hash[:assertion_schema_dep]) : nil @assertion_drift_status = hash[:assertion_drift_status] @schema_drift = hash[:schema_drift] @schema_drift_detail = hash[:schema_drift_detail] @validation_status = hash[:validation_status] @validation_issues = (hash[:validation_issues] || []) @latest_run_summary = hash[:latest_run_summary] ? Retab::LatestBlockTestRunSummary.new(hash[:latest_run_summary]) : nil @latest_passing_run_summary = hash[:latest_passing_run_summary] ? Retab::LatestBlockTestRunSummary.new( hash[:latest_passing_run_summary] ) : nil @latest_failing_run_summary = hash[:latest_failing_run_summary] ? Retab::LatestBlockTestRunSummary.new( hash[:latest_failing_run_summary] ) : nil @created_at = hash[:created_at] @updated_at = hash[:updated_at] end |
Instance Attribute Details
#assertion ⇒ Object
Returns the value of attribute assertion.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def assertion @assertion end |
#assertion_drift_status ⇒ Object
Returns the value of attribute assertion_drift_status.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def assertion_drift_status @assertion_drift_status end |
#assertion_schema_dep ⇒ Object
Returns the value of attribute assertion_schema_dep.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def assertion_schema_dep @assertion_schema_dep end |
#created_at ⇒ Object
Returns the value of attribute created_at.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def id @id end |
#latest_failing_run_summary ⇒ Object
Returns the value of attribute latest_failing_run_summary.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def latest_failing_run_summary @latest_failing_run_summary end |
#latest_passing_run_summary ⇒ Object
Returns the value of attribute latest_passing_run_summary.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def latest_passing_run_summary @latest_passing_run_summary end |
#latest_run_summary ⇒ Object
Returns the value of attribute latest_run_summary.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def latest_run_summary @latest_run_summary end |
#name ⇒ Object
Returns the value of attribute name.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def name @name end |
#schema_drift ⇒ Object
Returns the value of attribute schema_drift.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def schema_drift @schema_drift end |
#schema_drift_detail ⇒ Object
Returns the value of attribute schema_drift_detail.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def schema_drift_detail @schema_drift_detail end |
#source ⇒ Object
Returns the value of attribute source.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def source @source end |
#target ⇒ Object
Returns the value of attribute target.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def target @target end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def updated_at @updated_at end |
#validation_issues ⇒ Object
Returns the value of attribute validation_issues.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def validation_issues @validation_issues end |
#validation_status ⇒ Object
Returns the value of attribute validation_status.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def validation_status @validation_status end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
28 29 30 |
# File 'lib/retab/workflow_tests/workflow_test.rb', line 28 def workflow_id @workflow_id end |