Sha256: 7cfb550fa77717a53030bb859a27ace7d6cb58b0b6c607611b16709839128809

Contents?: true

Size: 362 Bytes

Versions: 12

Compression:

Stored size: 362 Bytes

Contents

module FnordMetric::GaugeValidations

  def validate_series!
    if !@opts[:series].is_a?(Array) || @opts[:series].size == 0
      raise "#{@opts[:key]}: missing option series"
    end

    if @opts[:series].size != @opts[:series].uniq.size
      raise "#{@opts[:key]}: series are not unique"
    end

    @opts[:series] = @opts[:series].map(&:to_sym)
  end

end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
johnf-fnordmetric-1.2.10 lib/fnordmetric/gauge_validations.rb
fnordmetric-1.2.9 lib/fnordmetric/gauge_validations.rb
johnf-fnordmetric-1.2.7 lib/fnordmetric/gauge_validations.rb
bp-fnordmetric-1.2.7 lib/fnordmetric/gauge_validations.rb
fnordmetric-1.2.7 lib/fnordmetric/gauge_validations.rb
fnordmetric-1.2.6 lib/fnordmetric/gauge_validations.rb
fnordmetric-1.2.4 lib/fnordmetric/gauge_validations.rb
fnordmetric-1.2.1 lib/fnordmetric/gauge_validations.rb
fnordmetric-1.2.0 lib/fnordmetric/gauge_validations.rb
fnordmetric-1.0.1 lib/fnordmetric/gauge_validations.rb
fnordmetric-1.0.0 lib/fnordmetric/gauge_validations.rb
fnordmetric-0.9.7 lib/fnordmetric/gauge_validations.rb