class Poke::Outputers::VerboseOutputer
Public Instance Methods
on_check_after(check, options = {})
click to toggle source
# File lib/poke/outputers/verbose_outputer.rb, line 31 def on_check_after(check, options = {}) if options[:returncode] == :ok puts "✔ ".green + options[:message].green @checks_ok += 1 else puts "✘ ".red + options[:message].red @checks_nok += 1 end puts "" end
on_check_before(check, index)
click to toggle source
# File lib/poke/outputers/verbose_outputer.rb, line 26 def on_check_before(check, index) puts "Check ##{index + 1}: #{check.name}".yellow @checks += 1 end
on_end()
click to toggle source
# File lib/poke/outputers/verbose_outputer.rb, line 43 def on_end puts "Finish - Sum up".cyan puts "#{@checks} checks | " + "#{@checks_ok} ok".green + " | " + "#{@checks_nok} not ok".red end
on_start(checks)
click to toggle source
# File lib/poke/outputers/verbose_outputer.rb, line 15 def on_start(checks) puts "POKE #{VERSION}".cyan puts "Automated network checks".cyan puts "#{checks.size} checks in the database".cyan puts "" @checks = 0 @checks_ok = 0 @checks_nok = 0 end