Sha256: 79d4d54fd5d3d6ee73736fa2a1407ce31829d76eba251c711ca3becf14d10084

Contents?: true

Size: 355 Bytes

Versions: 24

Compression:

Stored size: 355 Bytes

Contents

module CC
  module Analyzer
    module MeasurementValidations
      class ValueValidation < Validation
        def valid?
          value && value.is_a?(Numeric)
        end

        def message
          "Value must be present and numeric"
        end

        private

        def value
          object["value"]
        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/value_validation.rb
codeclimate-0.83.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.82.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.81.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.80.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.79.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.78.1 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.78.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.77.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.76.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.75.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.74.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.73.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.72.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.71.2 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.71.1 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.71.0 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.70.6 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.70.5 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.70.4 lib/cc/analyzer/measurement_validations/value_validation.rb