Method: Wavefront::Validators#wf_sampling_value?
- Defined in:
- lib/wavefront-sdk/validators.rb
#wf_sampling_value?(value) ⇒ Boolean
Ensure the given value is a valid sampling rate.
626 627 628 629 630 |
# File 'lib/wavefront-sdk/validators.rb', line 626 def wf_sampling_value?(value) return true if value.is_a?(Numeric) && value.between?(0, 0.05) raise Wavefront::Exception::InvalidSamplingValue, value end |