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



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

def call(options)
  fmt = options.fetch('format', Npmdc.config.format)
  klass(fmt).new(options)
end