Sha256: 62d402c76685e86076cdafea411d7bdf18b810ac55a20bddee75feed38942c88
Contents?: true
Size: 545 Bytes
Versions: 2
Compression:
Stored size: 545 Bytes
Contents
# frozen_string_literal: true module TraceLocation module Report # :nodoc: require_relative 'generator' class InvalidFormatError < ArgumentError; end GENERATORS = { log: ::TraceLocation::Generator::Log }.freeze def self.build(events, return_value, options) resolve_generator(options[:format]).new(events, return_value, options) end def self.resolve_generator(format) format ||= TraceLocation.config.default_format GENERATORS.fetch(format) { raise InvalidFormatError } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trace_location-0.3.0 | lib/trace_location/report.rb |
trace_location-0.2.0 | lib/trace_location/report.rb |