Module: CC::Analyzer::Formatters
- Defined in:
- lib/cc/analyzer/formatters.rb,
lib/cc/analyzer/formatters/spinner.rb,
lib/cc/analyzer/formatters/formatter.rb,
lib/cc/analyzer/formatters/json_formatter.rb,
lib/cc/analyzer/formatters/plain_text_formatter.rb
Defined Under Namespace
Classes: Formatter, JSONFormatter, PlainTextFormatter, Spinner
Constant Summary collapse
- FORMATTERS =
{ json: JSONFormatter, text: PlainTextFormatter, }.freeze
Class Method Summary collapse
Class Method Details
.resolve(name) ⇒ Object
14 15 16 |
# File 'lib/cc/analyzer/formatters.rb', line 14 def self.resolve(name) FORMATTERS[name.to_sym].new or raise InvalidFormatterError, "'#{name}' is not a valid formatter. Valid options are: #{FORMATTERS.keys.join(", ")}" end |