module StubRequests::URI::Suffix

Module Suffix deals with validating {URI} suffix

Constants

PORT_REGEX

@return [RegExp] a pattern used for matching HTTP(S) ports

Public Class Methods

valid?(host) click to toggle source

Checks if the host has a valid suffix

@param [String] host a string to check

@return [true,false]

# File lib/stub_requests/uri/suffix.rb, line 31
def self.valid?(host)
  PublicSuffix.valid?(host, default_rule: nil)
end