Class: Evilution::Runner::ReportPublisher Private
- Inherits:
-
Object
- Object
- Evilution::Runner::ReportPublisher
- Defined in:
- lib/evilution/runner/report_publisher.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(config) ⇒ ReportPublisher
constructor
private
A new instance of ReportPublisher.
- #publish(summary) ⇒ Object private
- #save_session(summary) ⇒ Object private
Constructor Details
#initialize(config) ⇒ ReportPublisher
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ReportPublisher.
10 11 12 |
# File 'lib/evilution/runner/report_publisher.rb', line 10 def initialize(config) @config = config end |
Instance Method Details
#publish(summary) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/evilution/runner/report_publisher.rb', line 14 def publish(summary) reporter = build_reporter return unless reporter output = reporter.call(summary) return if config.quiet if config.html? path = "evilution-report.html" File.write(path, output) warn "HTML report written to #{path}" else $stdout.puts(output) end end |
#save_session(summary) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 33 34 35 36 |
# File 'lib/evilution/runner/report_publisher.rb', line 30 def save_session(summary) return unless config.save_session? Evilution::Session::Store.new.save(summary) rescue StandardError => e warn "[evilution] failed to save session: #{e.}" unless config.quiet end |