Class: FlexStationData::SampleQuality
- Inherits:
-
Object
- Object
- FlexStationData::SampleQuality
- Includes:
- Callable
- Defined in:
- lib/flex_station_data/services/sample_quality.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#sample ⇒ Object
readonly
Returns the value of attribute sample.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(sample, **options) ⇒ SampleQuality
constructor
A new instance of SampleQuality.
- #value_quality(value) ⇒ Object
Constructor Details
#initialize(sample, **options) ⇒ SampleQuality
Returns a new instance of SampleQuality.
11 12 13 14 |
# File 'lib/flex_station_data/services/sample_quality.rb', line 11 def initialize(sample, **) @sample = sample @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/flex_station_data/services/sample_quality.rb', line 9 def @options end |
#sample ⇒ Object (readonly)
Returns the value of attribute sample.
9 10 11 |
# File 'lib/flex_station_data/services/sample_quality.rb', line 9 def sample @sample end |
Instance Method Details
#call ⇒ Object
20 21 22 |
# File 'lib/flex_station_data/services/sample_quality.rb', line 20 def call sample.values.flatten.map(&method(:value_quality)).uniq(&:to_s) end |
#value_quality(value) ⇒ Object
16 17 18 |
# File 'lib/flex_station_data/services/sample_quality.rb', line 16 def value_quality(value) ValueQuality.call(value, **) end |