class Poke::Outputers::Outputer
Public Instance Methods
on_check_after(check, options = {})
click to toggle source
# File lib/poke/outputers/outputer.rb, line 31 def on_check_after(check, options = {}) if options[:returncode] == :ok print ".".green @checks_ok += 1 else print ".".red @checks_nok += 1 end puts " (" + @current_checks.to_s + "/" + @number_checks.to_s + ")" if @current_checks % 60 == 0 end
on_check_before(check, index)
click to toggle source
# File lib/poke/outputers/outputer.rb, line 27 def on_check_before(check, index) @current_checks += 1 end
on_end()
click to toggle source
# File lib/poke/outputers/outputer.rb, line 43 def on_end puts "" puts "" puts "Finish - Sum up".cyan puts "#{@number_checks} checks | " + "#{@checks_ok} ok".green + " | " + "#{@checks_nok} not ok".red end
on_start(checks)
click to toggle source
# File lib/poke/outputers/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 "" @number_checks = checks.size @current_checks = 0 @checks_ok = 0 @checks_nok = 0 end