Method: HTMLProofer::Runner#initialize

Defined in:
lib/html_proofer/runner.rb

#initialize(src, opts = {}) ⇒ Runner

Returns a new instance of Runner.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/html_proofer/runner.rb', line 14

def initialize(src, opts = {})
  @options = HTMLProofer::Configuration.generate_defaults(opts)

  @type = @options.delete(:type)
  @source = src

  @logger = HTMLProofer::Log.new(@options[:log_level])
  @cache = Cache.new(self, @options[:cache])

  @external_urls = {}
  @internal_urls = {}
  @failures = []

  @before_request = []

  @resolved_paths = {}

  @current_check = nil
  @current_source = nil
  @current_filename = nil

  @reporter = Reporter::Terminal.new(logger: @logger)
end