Class: CheckZilla::Notifier::Console

Inherits:
Object
  • Object
show all
Defined in:
lib/checkzilla/notifier/console.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Console

Returns a new instance of Console.



4
5
# File 'lib/checkzilla/notifier/console.rb', line 4

def initialize &block
end

Instance Method Details

#perform!(checkers) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/checkzilla/notifier/console.rb', line 7

def perform! checkers
  checkers.each do |checker|
    checker_name = checker.class.name.split("::").last
    title = "#{checker_name} Report"
    puts "#{title}\n#{"="*title.size}"

    checker.results.each do |name, versions|
      local_version = versions[0]
      newer_version = versions[1]
      puts "#{name} from #{local_version} to #{newer_version}"
    end
  end
end