class Dhalang::UrlUtils

Contains common logic for URL's.

Public Class Methods

validate(url) click to toggle source

Raises an error if the given URL cannot be used for navigation with Puppeteer.

@param [String] url The url to validate

# File lib/Dhalang/url_utils.rb, line 8
def self.validate(url)
    if (url !~ URI::DEFAULT_PARSER.regexp[:ABS_URI])
        raise URI::InvalidURIError, 'The given url was invalid, use format http://www.example.com'
    end
end