Class: LintTrappings::FormatterLoader
- Inherits:
-
Object
- Object
- LintTrappings::FormatterLoader
- Defined in:
- lib/lint_trappings/formatter_loader.rb
Overview
Loads the configured formatters.
Instance Method Summary collapse
-
#initialize(application, config, output) ⇒ FormatterLoader
constructor
A new instance of FormatterLoader.
- #load(options) ⇒ Object
Constructor Details
#initialize(application, config, output) ⇒ FormatterLoader
Returns a new instance of FormatterLoader.
4 5 6 7 8 |
# File 'lib/lint_trappings/formatter_loader.rb', line 4 def initialize(application, config, output) @application = application @config = config @output = output end |
Instance Method Details
#load(options) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/lint_trappings/formatter_loader.rb', line 10 def load() outputs = .fetch(:formatters, [{ 'Default' => :stdout }]) outputs.map do |output_specification| output_specification.map do |formatter_name, output_path| load_formatter(formatter_name) create_formatter(formatter_name, output_path, ) end end.flatten end |