Class: BrokenLinkFinder::TextReporter

Inherits:
Reporter
  • Object
show all
Defined in:
lib/broken_link_finder/reporter/text_reporter.rb

Overview

Class responsible for reporting in a text format.

Constant Summary

Constants inherited from Reporter

Reporter::NUM_VALUES

Instance Method Summary collapse

Constructor Details

#initialize(stream, sort, broken_links, ignored_links, broken_link_map, crawl_stats) ⇒ TextReporter

Returns a new TextReporter instance. stream is any Object that responds to :puts and :print.



8
9
10
11
12
# File 'lib/broken_link_finder/reporter/text_reporter.rb', line 8

def initialize(stream, sort,
               broken_links, ignored_links,
               broken_link_map, crawl_stats)
  super
end

Instance Method Details

#call(broken_verbose: true, ignored_verbose: false) ⇒ Object Also known as: report

Pretty print a report detailing the full link summary.



15
16
17
18
19
20
21
# File 'lib/broken_link_finder/reporter/text_reporter.rb', line 15

def call(broken_verbose: true, ignored_verbose: false)
  report_crawl_summary
  report_broken_links(verbose: broken_verbose)
  report_ignored_links(verbose: ignored_verbose)

  nil
end