class VCR::RequestIgnorer
@private
def ignore?(request)
def ignore?(request) invoke_hook(:ignore_request, request).any? end
def ignore_hosts(*hosts)
def ignore_hosts(*hosts) ignored_hosts.merge(hosts) end
def ignore_localhost=(value)
def ignore_localhost=(value) if value ignore_hosts(*LOCALHOST_ALIASES) else ignored_hosts.reject! { |h| LOCALHOST_ALIASES.include?(h) } end end
def ignored_hosts
def ignored_hosts @ignored_hosts ||= Set.new end
def initialize
def initialize ignore_request do |request| host = request.parsed_uri.host ignored_hosts.include?(host) end end
def localhost_ignored?
def localhost_ignored? (LOCALHOST_ALIASES & ignore_hosts.to_a).any? end
def unignore_hosts(*hosts)
def unignore_hosts(*hosts) ignored_hosts.subtract(hosts) end