Class: CC::Analyzer::MeasurementValidations::ValueValidation

Inherits:
Validation
  • Object
show all
Defined in:
lib/cc/analyzer/measurement_validations/value_validation.rb

Instance Method Summary collapse

Methods inherited from Validation

#initialize

Constructor Details

This class inherits a constructor from CC::Analyzer::MeasurementValidations::Validation

Instance Method Details

#messageObject



9
10
11
# File 'lib/cc/analyzer/measurement_validations/value_validation.rb', line 9

def message
  "Value must be present and numeric"
end

#valid?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/cc/analyzer/measurement_validations/value_validation.rb', line 5

def valid?
  value&.is_a?(Numeric)
end