Method: Wavefront::Validators#wf_value?

Defined in:
lib/wavefront-sdk/validators.rb

#wf_value?(value) ⇒ Boolean

Ensure the given argument is a valid Wavefront value. Can be any form of Numeric, including standard notation.

Parameters:

  • value (Numeric)

    the source name to validate

Returns:

  • (Boolean)

    True if the value is valid

Raises:

  • Wavefront::Exception::InvalidValue if the value is not valid



157
158
159
160
161
# File 'lib/wavefront-sdk/validators.rb', line 157

def wf_value?(value)
  return true if value.is_a?(Numeric)

  raise Wavefront::Exception::InvalidMetricValue, value
end