Sha256: ca58f0288316baf79b16d6e26c89bf2be329c0e6330a1c3913a4687a2af12a3c
Contents?: true
Size: 508 Bytes
Versions: 1
Compression:
Stored size: 508 Bytes
Contents
module Dhalang # Contains common logic for URL's. class UrlUtils # Raises an error if the given URL cannot be used for navigation with Puppeteer. # # @param [String] url The url to validate def self.validate(url) parsed = URI.parse(url) # Raise URI::InvalidURIError on invalid URLs return true if parsed.absolute? raise URI::InvalidURIError, 'The given url was invalid, use format http://www.example.com' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
Dhalang-0.7.2 | lib/Dhalang/url_utils.rb |