Sha256: 57c98d4e32036fc371e32e87498b2c906ec6ec72d71658b22093cf2b9a579f47

Contents?: true

Size: 303 Bytes

Versions: 24

Compression:

Stored size: 303 Bytes

Contents

module CC
  module Analyzer
    module MeasurementValidations
      class TypeValidation < Validation
        def valid?
          type && type.casecmp("measurement").zero?
        end

        def message
          "Type must be 'measurement' but was '#{type}'"
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
codeclimate-0.84.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.83.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.82.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.81.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.80.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.79.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.78.1 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.78.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.77.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.76.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.75.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.74.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.73.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.72.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.71.2 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.71.1 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.71.0 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.70.6 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.70.5 lib/cc/analyzer/measurement_validations/type_validation.rb
codeclimate-0.70.4 lib/cc/analyzer/measurement_validations/type_validation.rb