Method: Wavefront::Validators#uuid?
- Defined in:
- lib/wavefront-sdk/validators.rb
#uuid?(str) ⇒ Bool
Is the given string a UUID? These are used for various item IDs.
23 24 25 |
# File 'lib/wavefront-sdk/validators.rb', line 23 def uuid?(str) str.is_a?(String) && str =~ /([a-f\d]{8}(-[a-f\d]{4}){3}-[a-f\d]{12})/ end |