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.0.44 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.43 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.42 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.41 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.40 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.39 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.38 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.37 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.36 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.35 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.34 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.33 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.32 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.31 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.30 lib/facter/framework/formatters/formatter_factory.rb
facter-4.0.29 lib/framework/formatters/formatter_factory.rb
facter-4.0.28 lib/framework/formatters/formatter_factory.rb
facter-4.0.26 lib/framework/formatters/formatter_factory.rb
facter-4.0.25 lib/framework/formatters/formatter_factory.rb
facter-4.0.24 lib/framework/formatters/formatter_factory.rb