Class: Poke::Poke

Inherits:
Object
  • Object
show all
Defined in:
lib/poke.rb

Instance Method Summary collapse

Constructor Details

#initialize(checks, outputer) ⇒ Poke

Constructor



26
27
28
29
# File 'lib/poke.rb', line 26

def initialize(checks, outputer)
  @checks = checks
  @outputer = outputer
end

Instance Method Details

#runObject

Launch all checks in the same time



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/poke.rb', line 33

def run
  @outputer.on_start(@checks)

  @checks.each_with_index do |check, index|
    @outputer.on_check_before(check, index)
    returncode, message = check.run
    @outputer.on_check_after(check, {:returncode => returncode, :message => message})
  end

  @outputer.on_end
end