Class: Retab::ArtifactFreshness
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ArtifactFreshness
- Defined in:
- lib/retab/workflow_experiments/artifact_freshness.rb
Constant Summary collapse
- HASH_ATTRS =
{ status: :status, reasons: :reasons, validity_fingerprint: :validity_fingerprint, input_fingerprint: :input_fingerprint, baseline_run_id: :baseline_run_id }.freeze
Instance Attribute Summary collapse
-
#baseline_run_id ⇒ Object
Returns the value of attribute baseline_run_id.
-
#input_fingerprint ⇒ Object
Returns the value of attribute input_fingerprint.
-
#reasons ⇒ Object
Returns the value of attribute reasons.
-
#status ⇒ Object
Returns the value of attribute status.
-
#validity_fingerprint ⇒ Object
Returns the value of attribute validity_fingerprint.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ArtifactFreshness
constructor
A new instance of ArtifactFreshness.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ArtifactFreshness
Returns a new instance of ArtifactFreshness.
24 25 26 27 28 29 30 31 32 |
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 24 def initialize(json) super() hash = self.class.normalize(json) @status = hash[:status].nil? ? "unknown" : hash[:status] @reasons = (hash[:reasons] || []) @validity_fingerprint = hash[:validity_fingerprint] @input_fingerprint = hash[:input_fingerprint] @baseline_run_id = hash[:baseline_run_id] end |
Instance Attribute Details
#baseline_run_id ⇒ Object
Returns the value of attribute baseline_run_id.
16 17 18 |
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16 def baseline_run_id @baseline_run_id end |
#input_fingerprint ⇒ Object
Returns the value of attribute input_fingerprint.
16 17 18 |
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16 def input_fingerprint @input_fingerprint end |
#reasons ⇒ Object
Returns the value of attribute reasons.
16 17 18 |
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16 def reasons @reasons end |
#status ⇒ Object
Returns the value of attribute status.
16 17 18 |
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16 def status @status end |
#validity_fingerprint ⇒ Object
Returns the value of attribute validity_fingerprint.
16 17 18 |
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16 def validity_fingerprint @validity_fingerprint end |