Class: Retab::MetricsStaleErrorLastRun

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/experiment_run_metrics/metrics_stale_error_last_run.rb

Constant Summary collapse

HASH_ATTRS =
{
  run_id: :run_id,
  definition_fingerprint: :definition_fingerprint,
  score: :score,
  created_at: :created_at
}.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) ⇒ MetricsStaleErrorLastRun

Returns a new instance of MetricsStaleErrorLastRun.



21
22
23
24
25
26
27
# File 'lib/retab/experiment_run_metrics/metrics_stale_error_last_run.rb', line 21

def initialize(json)
  hash = self.class.normalize(json)
  @run_id = hash[:run_id]
  @definition_fingerprint = hash[:definition_fingerprint]
  @score = hash[:score]
  @created_at = hash[:created_at]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



15
16
17
# File 'lib/retab/experiment_run_metrics/metrics_stale_error_last_run.rb', line 15

def created_at
  @created_at
end

#definition_fingerprintObject

Returns the value of attribute definition_fingerprint.



15
16
17
# File 'lib/retab/experiment_run_metrics/metrics_stale_error_last_run.rb', line 15

def definition_fingerprint
  @definition_fingerprint
end

#run_idObject

Returns the value of attribute run_id.



15
16
17
# File 'lib/retab/experiment_run_metrics/metrics_stale_error_last_run.rb', line 15

def run_id
  @run_id
end

#scoreObject

Returns the value of attribute score.



15
16
17
# File 'lib/retab/experiment_run_metrics/metrics_stale_error_last_run.rb', line 15

def score
  @score
end