puppetlabs/facter

View on GitHub
lib/facter/custom_facts/util/composite_loader.rb

Summary

Maintainability
A
0 mins
Test Coverage
C
71%
# frozen_string_literal: true

# A composite loader that allows for more than one
# default directory loader

module LegacyFacter
  module Util
    class CompositeLoader
      def initialize(loaders)
        @loaders = loaders
      end

      def load(collection)
        @loaders.each { |loader| loader.load(collection) }
      end
    end
  end
end