class FormatterFactory
Factory for formatting dependencies
Public Instance Methods
get_formatter(verbose:, format: 'text')
click to toggle source
# File lib/chelsea/formatters/factory.rb, line 25 def get_formatter(verbose:, format: 'text') case format when 'text' Chelsea::TextFormatter.new verbose: verbose when 'json' Chelsea::JsonFormatter.new verbose: verbose when 'xml' Chelsea::XMLFormatter.new verbose: verbose else # rubocop:disable Lint/DuplicateBranch Chelsea::TextFormatter.new verbose: verbose end end