Class: Retab::ArtifactDrift
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ArtifactDrift
- Defined in:
- lib/retab/workflow_experiments/artifact_drift.rb
Constant Summary collapse
- HASH_ATTRS =
{ status: :status, affected_targets: :affected_targets, detail: :detail }.freeze
Instance Attribute Summary collapse
-
#affected_targets ⇒ Object
Returns the value of attribute affected_targets.
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#status ⇒ Object
Returns the value of attribute status.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ArtifactDrift
constructor
A new instance of ArtifactDrift.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ArtifactDrift
Returns a new instance of ArtifactDrift.
20 21 22 23 24 25 26 |
# File 'lib/retab/workflow_experiments/artifact_drift.rb', line 20 def initialize(json) super() hash = self.class.normalize(json) @status = hash[:status].nil? ? "unknown" : hash[:status] @affected_targets = (hash[:affected_targets] || []) @detail = hash[:detail] end |
Instance Attribute Details
#affected_targets ⇒ Object
Returns the value of attribute affected_targets.
14 15 16 |
# File 'lib/retab/workflow_experiments/artifact_drift.rb', line 14 def affected_targets @affected_targets end |
#detail ⇒ Object
Returns the value of attribute detail.
14 15 16 |
# File 'lib/retab/workflow_experiments/artifact_drift.rb', line 14 def detail @detail end |
#status ⇒ Object
Returns the value of attribute status.
14 15 16 |
# File 'lib/retab/workflow_experiments/artifact_drift.rb', line 14 def status @status end |