class PeekAView::Tools::Checker

Public Class Methods

new(options = {}) click to toggle source
# File lib/peek_a_view/tools/checker.rb, line 8
def initialize(options = {})
  @options = options
end

Public Instance Methods

clean_reports() click to toggle source
# File lib/peek_a_view/tools/checker.rb, line 12
def clean_reports
  FileUtils.rm_rf(report_dir)
end

Protected Instance Methods

report_dir() click to toggle source
# File lib/peek_a_view/tools/checker.rb, line 18
def report_dir
  raise NotImplementedError,
        "report_dir must be overridden in subclasses of #{self.class}."
end
report_path(uri, ext = nil) click to toggle source
# File lib/peek_a_view/tools/checker.rb, line 23
def report_path(uri, ext = nil)
  view   = view_from_uri(uri)
  report = File.join(report_dir, view)
  report += ext if ext
  FileUtils.mkpath(File.dirname(report))
  report
end
view_from_uri(uri) click to toggle source
# File lib/peek_a_view/tools/checker.rb, line 31
def view_from_uri(uri)
  PeekAView::Tools.view_from_uri(uri, @options)
end