Sha256: b4ef0d8017aef1a6c3955596ac018713796b624ec14697129fe2f53958a1c136

Contents?: true

Size: 470 Bytes

Versions: 1

Compression:

Stored size: 470 Bytes

Contents

# frozen_string_literal: true

require "flex_station_data/services/value_quality"

module FlexStationData
  class SampleQuality
    include Concerns::Service

    attr_reader :sample, :options

    def initialize(sample, **options)
      @sample = sample
      @options = options
    end

    def value_quality(value)
      ValueQuality.call(value, **options)
    end

    def call
      sample.values.flatten.map(&method(:value_quality)).uniq(&:to_s)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flex-station-data-1.0.2 lib/flex_station_data/services/sample_quality.rb