Sha256: df863b43eca85b7b27caf3ef5a57853c4f6f04b18bc6ff43530abd68d89402b8

Contents?: true

Size: 308 Bytes

Versions: 77

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

module Facter
  class FormatterFactory
    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
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
facter-4.10.0 lib/facter/framework/formatters/formatter_factory.rb
facter-4.9.0 lib/facter/framework/formatters/formatter_factory.rb
facter-4.8.0 lib/facter/framework/formatters/formatter_factory.rb
facter-4.7.1 lib/facter/framework/formatters/formatter_factory.rb
facter-4.7.0 lib/facter/framework/formatters/formatter_factory.rb
facter-4.6.1 lib/facter/framework/formatters/formatter_factory.rb
facter-4.6.0 lib/facter/framework/formatters/formatter_factory.rb
facter-4.5.2 lib/facter/framework/formatters/formatter_factory.rb
facter-4.5.1 lib/facter/framework/formatters/formatter_factory.rb
facter-4.5.0 lib/facter/framework/formatters/formatter_factory.rb
facter-4.4.3 lib/facter/framework/formatters/formatter_factory.rb
facter-4.4.2 lib/facter/framework/formatters/formatter_factory.rb
facter-4.4.1 lib/facter/framework/formatters/formatter_factory.rb
facter-4.4.0 lib/facter/framework/formatters/formatter_factory.rb
facter-4.3.1 lib/facter/framework/formatters/formatter_factory.rb
facter-4.3.0 lib/facter/framework/formatters/formatter_factory.rb
facter-4.2.14 lib/facter/framework/formatters/formatter_factory.rb
facter-4.2.13 lib/facter/framework/formatters/formatter_factory.rb
facter-4.2.12 lib/facter/framework/formatters/formatter_factory.rb
facter-4.2.11 lib/facter/framework/formatters/formatter_factory.rb