module Checker

Module for checking parts on a site

Public Class Methods

call_via_rest_client(href) click to toggle source

Use rest-client to try and get status of URL

# File lib/generic_test/checker.rb, line 35
def call_via_rest_client(href)
  RestClient.get(href).code
rescue RestClient::Exception => e
  return e.response&.code if e.respond_to? :response

  raise e
end
valid_email?(email_address) click to toggle source

@return [Nil, String] Nil if valid, string if error

# File lib/generic_test/checker.rb, line 30
def valid_email?(email_address)
  EmailAddress.error email_address
end