Method: Wavefront::Validators#wf_savedsearch_id?

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

#wf_savedsearch_id?(id) ⇒ Boolean

Ensure the given argument is a valid saved search ID.

Parameters:

  • id (String)

    saved search ID

Returns:

  • (Boolean)

    true if valid

Raises:

  • Wavefront::Exceptions::InvalidSavedSearchId if not valid



364
365
366
367
368
# File 'lib/wavefront-sdk/validators.rb', line 364

def wf_savedsearch_id?(id)
  return true if id.is_a?(String) && id =~ /^\w{8}$/

  raise Wavefront::Exception::InvalidSavedSearchId, id
end