module Npmdc::Formatter
Constants
- FORMATTERS
Public Class Methods
call(options)
click to toggle source
# File lib/npmdc/formatter.rb, line 14 def call(options) fmt = options.fetch('format', Npmdc.config.format) klass(fmt).new(options) end
Private Class Methods
klass(fmt)
click to toggle source
# File lib/npmdc/formatter.rb, line 21 def klass(fmt) FORMATTERS[fmt.to_sym] || raise(Npmdc::Errors::UnknownFormatter, formatter: fmt) end