Class: Retab::ExperimentMetricsStaleError
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ExperimentMetricsStaleError
- Defined in:
- lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb
Constant Summary collapse
- HASH_ATTRS =
{ kind: :kind, error: :error, experiment_id: :experiment_id, stale_reasons: :stale_reasons, last_run: :last_run, current_config_fingerprint: :current_config_fingerprint, message: :message }.freeze
Instance Attribute Summary collapse
-
#current_config_fingerprint ⇒ Object
Returns the value of attribute current_config_fingerprint.
-
#error ⇒ Object
Returns the value of attribute error.
-
#experiment_id ⇒ Object
Returns the value of attribute experiment_id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#last_run ⇒ Object
Returns the value of attribute last_run.
-
#message ⇒ Object
Returns the value of attribute message.
-
#stale_reasons ⇒ Object
Returns the value of attribute stale_reasons.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ExperimentMetricsStaleError
constructor
A new instance of ExperimentMetricsStaleError.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ExperimentMetricsStaleError
Returns a new instance of ExperimentMetricsStaleError.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb', line 27 def initialize(json) hash = self.class.normalize(json) @kind = hash[:kind] @error = hash[:error] @experiment_id = hash[:experiment_id] @stale_reasons = (hash[:stale_reasons] || []) @last_run = hash[:last_run] ? Retab::MetricsStaleErrorLastRun.new(hash[:last_run]) : nil @current_config_fingerprint = hash[:current_config_fingerprint] @message = hash[:message] end |
Instance Attribute Details
#current_config_fingerprint ⇒ Object
Returns the value of attribute current_config_fingerprint.
18 19 20 |
# File 'lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb', line 18 def current_config_fingerprint @current_config_fingerprint end |
#error ⇒ Object
Returns the value of attribute error.
18 19 20 |
# File 'lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb', line 18 def error @error end |
#experiment_id ⇒ Object
Returns the value of attribute experiment_id.
18 19 20 |
# File 'lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb', line 18 def experiment_id @experiment_id end |
#kind ⇒ Object
Returns the value of attribute kind.
18 19 20 |
# File 'lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb', line 18 def kind @kind end |
#last_run ⇒ Object
Returns the value of attribute last_run.
18 19 20 |
# File 'lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb', line 18 def last_run @last_run end |
#message ⇒ Object
Returns the value of attribute message.
18 19 20 |
# File 'lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb', line 18 def @message end |
#stale_reasons ⇒ Object
Returns the value of attribute stale_reasons.
18 19 20 |
# File 'lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb', line 18 def stale_reasons @stale_reasons end |