Module: Npmdc::Formatter

Defined in:
lib/npmdc/formatter.rb

Constant Summary collapse

FORMATTERS =
{
  progress: Npmdc::Formatters::Progress,
  doc:      Npmdc::Formatters::Documentation,
  short:    Npmdc::Formatters::Short
}.freeze

Class Method Summary collapse

Class Method Details

.call(options) ⇒ Object



15
16
17
18
# File 'lib/npmdc/formatter.rb', line 15

def call(options)
  fmt = options.fetch('format', Npmdc.config.format)
  FORMATTERS[fmt.to_sym].new(options)
end