Class: LetItCrash::Formatter
- Inherits:
-
Object
- Object
- LetItCrash::Formatter
- Defined in:
- lib/letitcrash/formatter.rb
Instance Method Summary collapse
- #format(result) ⇒ Object
-
#initialize(rewriter: nil, reporters: [Reporters::Upload.from_env]) ⇒ Formatter
constructor
A new instance of Formatter.
-
#new ⇒ Object
This unfortunate trick is required since SimpleCov expects formatters to be classes rather than instances, and calls ‘new` on them.
Constructor Details
Instance Method Details
#format(result) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/letitcrash/formatter.rb', line 10 def format(result) report = Builders::ReportBuilder.build( environment: ENV, result: result, rewriter: rewriter, ) reporters.each { |reporter| reporter.report(report) } end |
#new ⇒ Object
This unfortunate trick is required since SimpleCov expects formatters to be classes rather than instances, and calls ‘new` on them.
21 22 23 |
# File 'lib/letitcrash/formatter.rb', line 21 def new self end |