Method: Wavefront::Validators#wf_source_id?
- Defined in:
- lib/wavefront-sdk/validators.rb
#wf_source_id?(source) ⇒ Boolean
Ensure the given argument is a valid Wavefront source name
392 393 394 395 396 397 398 399 |
# File 'lib/wavefront-sdk/validators.rb', line 392 def wf_source_id?(source) if source.is_a?(String) && source.match(/^[\w.-]+$/) && source.size < 1024 return true end raise Wavefront::Exception::InvalidSourceId, source end |