Method: Wavefront::Validators#wf_role_id?

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

#wf_role_id?(id) ⇒ Boolean

Ensure the given argument is a valid Wavefront role ID

Parameters:

  • id (String)

    the role ID to validate

Returns:

  • (Boolean)

    true if the role ID is valid

Raises:

  • Wavefront::Exception::InvalidRoleId if the role ID is not valid



637
638
639
640
641
# File 'lib/wavefront-sdk/validators.rb', line 637

def wf_role_id?(id)
  return true if uuid?(id)

  raise Wavefront::Exception::InvalidRoleId, id
end