module StubRequests::URI::Scheme

Module Scheme handles validation of {URI} schemes

Constants

SCHEMES

@return [Array<String>] a list of valid HTTP schemes

Public Class Methods

valid?(scheme) click to toggle source

Checks if the scheme is valid

@param [String] scheme a string with the URI scheme to check

@return [true,false]

# File lib/stub_requests/uri/scheme.rb, line 31
def self.valid?(scheme)
  SCHEMES.include?(scheme.to_s)
end