Class: Retab::ExperimentSummaryMetricDocument

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

Constant Summary collapse

HASH_ATTRS =
{
  id: :id,
  filename: :filename,
  score: :score,
  prior_score: :prior_score
}.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) ⇒ ExperimentSummaryMetricDocument

Returns a new instance of ExperimentSummaryMetricDocument.



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

def initialize(json)
  hash = self.class.normalize(json)
  @id = hash[:id]
  @filename = hash[:filename]
  @score = hash[:score]
  @prior_score = hash[:prior_score]
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



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

def filename
  @filename
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#prior_scoreObject

Returns the value of attribute prior_score.



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

def prior_score
  @prior_score
end

#scoreObject

Returns the value of attribute score.



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

def score
  @score
end