lib/inspec/utils/telemetry/collector.rb
# Finds the data series object with the specified name and returns it.
# If it does not exist then creates a new data series with that name
# and returns it.
# @return [Inspec::Telemetry::DataSeries]
Finds the data series object with the specified name and returns it.
If it does not exist then creates a new data series with that name
and returns it.
Finds the data series object with the specified name and returns it . If it does not exist then creates a new data series with that name and returns it .
def find_or_create_data_series(name)
      ds = @data_series.select { |data_series| data_series.name.eql?(name) }
      if ds.empty?
        new_data_series = Inspec::Telemetry::DataSeries.new(name)
        @data_series << new_data_series
        new_data_series
      else
        ds.first
      end
    end
def find_or_create_data_series ( name ) ds = @data_series . select { | data_series | data_series . name . eql? ( name ) } if ds . empty? new_data_series = Inspec :: Telemetry :: DataSeries . new ( name ) @data_series << new_data_series new_data_series else ds . first end end
Finds the data series object with the specified name and returns it.
Finds the data series object with the specified name and returns it .
None
Inspec::Telemetry::DataSeries
name