Method: Wavefront::Validators#wf_link_template?

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

Ensure the given argument is a valid external link template

Returns:

  • (Boolean)

    true if it is valid

Raises:

  • Wavefront::Exception::InvalidTemplate if not



32
33
34
35
36
37
38
39
# File 'lib/wavefront-sdk/validators.rb', line 32

def wf_link_template?(template)
  if template.is_a?(String) &&
     template.start_with?('http://', 'https://')
    return true
  end

  raise Wavefront::Exception::InvalidLinkTemplate, template
end