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.70.3 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.70.2 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.70.1 lib/cc/analyzer/measurement_validations/value_validation.rb
codeclimate-0.70.0 lib/cc/analyzer/measurement_validations/value_validation.rb