Class: Synthra::QualityMetrics::GenerationResult
- Inherits:
-
Object
- Object
- Synthra::QualityMetrics::GenerationResult
- Defined in:
- lib/synthra/quality_metrics.rb
Overview
Result with both records and quality report
Instance Attribute Summary collapse
-
#quality_report ⇒ Object
readonly
Returns the value of attribute quality_report.
-
#records ⇒ Object
readonly
Returns the value of attribute records.
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#each(&block) ⇒ Object
Delegate array methods to records.
-
#initialize(records, quality_report) ⇒ GenerationResult
constructor
A new instance of GenerationResult.
- #length ⇒ Object (also: #size)
- #map(&block) ⇒ Object
- #to_a ⇒ Object
Constructor Details
#initialize(records, quality_report) ⇒ GenerationResult
Returns a new instance of GenerationResult.
376 377 378 379 |
# File 'lib/synthra/quality_metrics.rb', line 376 def initialize(records, quality_report) @records = records @quality_report = quality_report end |
Instance Attribute Details
#quality_report ⇒ Object (readonly)
Returns the value of attribute quality_report.
374 375 376 |
# File 'lib/synthra/quality_metrics.rb', line 374 def quality_report @quality_report end |
#records ⇒ Object (readonly)
Returns the value of attribute records.
374 375 376 |
# File 'lib/synthra/quality_metrics.rb', line 374 def records @records end |
Instance Method Details
#[](index) ⇒ Object
396 397 398 |
# File 'lib/synthra/quality_metrics.rb', line 396 def [](index) @records[index] end |
#each(&block) ⇒ Object
Delegate array methods to records
382 383 384 |
# File 'lib/synthra/quality_metrics.rb', line 382 def each(&block) @records.each(&block) end |
#length ⇒ Object Also known as: size
390 391 392 |
# File 'lib/synthra/quality_metrics.rb', line 390 def length @records.length end |
#map(&block) ⇒ Object
386 387 388 |
# File 'lib/synthra/quality_metrics.rb', line 386 def map(&block) @records.map(&block) end |
#to_a ⇒ Object
400 401 402 |
# File 'lib/synthra/quality_metrics.rb', line 400 def to_a @records end |