Class: Facter::FormatterFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/framework/formatters/formatter_factory.rb

Class Method Summary collapse

Class Method Details

.build(options) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/facter/framework/formatters/formatter_factory.rb', line 5

def self.build(options)
  return JsonFactFormatter.new if options[:json]
  return YamlFactFormatter.new if options[:yaml]
  return HoconFactFormatter.new if options[:hocon]

  LegacyFactFormatter.new
end