class SLA::Formatters::Verbose
Public Instance Methods
handle(action, page)
click to toggle source
# File lib/sla/formatters/verbose.rb, line 4 def handle(action, page) case action when :source say "\n!txtpur!SOURCE #{page.url}" when :check show_check_status page when :skip say " !txtblu!SKIP!txtrst! #{page.depth} #{page.url}" end end
Private Instance Methods
show_check_status(page)
click to toggle source
# File lib/sla/formatters/verbose.rb, line 20 def show_check_status(page) @count += 1 show_error = false if page.valid? status = "PASS" color = "!txtgrn!" else @failed += 1 status = "FAIL" color = "!txtred!" show_error = page.code != 404 end say " #{color}#{status}!txtrst! #{page.depth} #{page.url}" say " !txtred!#{page.code}!txtrst! #{page.error}" if show_error end