Module: TraceLocation::Report
- Defined in:
- lib/trace_location/report.rb
Overview
:nodoc:
Defined Under Namespace
Classes: InvalidFormatError
Constant Summary collapse
- GENERATORS =
{ csv: ::TraceLocation::Generator::Csv, log: ::TraceLocation::Generator::Log, md: ::TraceLocation::Generator::Markdown, markdown: ::TraceLocation::Generator::Markdown }.freeze
Class Method Summary collapse
Class Method Details
.build(events, return_value, options) ⇒ Object
16 17 18 |
# File 'lib/trace_location/report.rb', line 16 def self.build(events, return_value, ) resolve_generator([:format]).new(events, return_value, ) end |
.resolve_generator(format) ⇒ Object
20 21 22 23 |
# File 'lib/trace_location/report.rb', line 20 def self.resolve_generator(format) format ||= TraceLocation.config.default_format GENERATORS.fetch(format) { raise InvalidFormatError } end |