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.23 lib/framework/formatters/formatter_factory.rb
facter-4.0.22 lib/framework/formatters/formatter_factory.rb
facter-4.0.21 lib/framework/formatters/formatter_factory.rb
facter-4.0.20 lib/framework/formatters/formatter_factory.rb
facter-4.0.19 lib/framework/formatters/formatter_factory.rb
facter-4.0.18 lib/framework/formatters/formatter_factory.rb
facter-4.0.17 lib/framework/formatters/formatter_factory.rb
facter-4.0.16 lib/framework/formatters/formatter_factory.rb
facter-4.0.15 lib/framework/formatters/formatter_factory.rb
facter-4.0.14 lib/framework/formatters/formatter_factory.rb
facter-4.0.13 lib/framework/formatters/formatter_factory.rb
facter-4.0.12 lib/framework/formatters/formatter_factory.rb
facter-4.0.11 lib/framework/formatters/formatter_factory.rb
facter-4.0.10.pre lib/framework/formatters/formatter_factory.rb
facter-4.0.9.pre lib/framework/formatters/formatter_factory.rb
facter-4.0.8.pre lib/framework/formatters/formatter_factory.rb
facter-4.0.7.pre lib/framework/formatters/formatter_factory.rb