Class: Webspicy::Tester::Reporter::Composite

Inherits:
Webspicy::Tester::Reporter show all
Defined in:
lib/webspicy/tester/reporter/composite.rb

Constant Summary

Constants inherited from Webspicy::Tester::Reporter

ErrorCount, HOOKS

Instance Attribute Summary

Attributes inherited from Webspicy::Tester::Reporter

#io, #tester

Instance Method Summary collapse

Methods included from Support::Colorize

colorize, colorize_error, colorize_highlight, colorize_section, colorize_success

Constructor Details

#initialize(*args, &bl) ⇒ Composite

Returns a new instance of Composite.



6
7
8
9
# File 'lib/webspicy/tester/reporter/composite.rb', line 6

def initialize(*args, &bl)
  super
  @reporters = []
end

Instance Method Details

#<<(reporter) ⇒ Object



11
12
13
14
# File 'lib/webspicy/tester/reporter/composite.rb', line 11

def <<(reporter)
  @reporters << reporter
  self
end

#find(kind) ⇒ Object



31
32
33
# File 'lib/webspicy/tester/reporter/composite.rb', line 31

def find(kind)
  @reporters.find{|r| r.is_a?(kind) }
end

#init(tester) ⇒ Object



16
17
18
19
20
21
# File 'lib/webspicy/tester/reporter/composite.rb', line 16

def init(tester)
  super
  @reporters.each do |r|
    r.init(tester)
  end
end