Method: Wavefront::Validators#wf_epoch?

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

#wf_epoch?(timestamp) ⇒ Boolean

Ensure the given argument is a valid epoch timestamp. Again, no range checking.

Parameters:

Returns:

  • (Boolean)

    True if the timestamp is valid

Raises:

  • Wavefront::Exception::InvalidMaintenanceWindow



125
126
127
128
129
# File 'lib/wavefront-sdk/validators.rb', line 125

def wf_epoch?(timestamp)
  return true if timestamp.is_a?(Numeric)

  raise Wavefront::Exception::InvalidTimestamp, timestamp
end