Class: Betatest::CompositeReporter
- Inherits:
-
AbstractReporter
- Object
- AbstractReporter
- Betatest::CompositeReporter
- Defined in:
- lib/betatest.rb
Overview
Dispatch to multiple reporters as one.
Instance Attribute Summary collapse
-
#reporters ⇒ Object
The list of reporters to dispatch to.
Instance Method Summary collapse
-
#<<(reporter) ⇒ Object
Add another reporter to the mix.
-
#initialize(*reporters) ⇒ CompositeReporter
constructor
:nodoc:.
-
#passed? ⇒ Boolean
:nodoc:.
-
#record(result) ⇒ Object
:nodoc:.
-
#report ⇒ Object
:nodoc:.
-
#start ⇒ Object
:nodoc:.
Constructor Details
#initialize(*reporters) ⇒ CompositeReporter
:nodoc:
595 596 597 598 |
# File 'lib/betatest.rb', line 595 def initialize *reporters # :nodoc: super() self.reporters = reporters end |
Instance Attribute Details
#reporters ⇒ Object
The list of reporters to dispatch to.
593 594 595 |
# File 'lib/betatest.rb', line 593 def reporters @reporters end |
Instance Method Details
#<<(reporter) ⇒ Object
Add another reporter to the mix.
603 604 605 |
# File 'lib/betatest.rb', line 603 def << reporter self.reporters << reporter end |
#passed? ⇒ Boolean
:nodoc:
607 608 609 |
# File 'lib/betatest.rb', line 607 def passed? # :nodoc: self.reporters.all?(&:passed?) end |
#record(result) ⇒ Object
:nodoc:
615 616 617 618 619 |
# File 'lib/betatest.rb', line 615 def record result # :nodoc: self.reporters.each do |reporter| reporter.record result end end |
#report ⇒ Object
:nodoc:
621 622 623 |
# File 'lib/betatest.rb', line 621 def report # :nodoc: self.reporters.each(&:report) end |
#start ⇒ Object
:nodoc:
611 612 613 |
# File 'lib/betatest.rb', line 611 def start # :nodoc: self.reporters.each(&:start) end |