Sha256: d4591c98967233ffeb9d274efb754ae3bf369ad9606934af4bb73a082878f1cd

Contents?: true

Size: 408 Bytes

Versions: 29

Compression:

Stored size: 408 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Resolvers
    class Path < BaseResolver
      @semaphore = Mutex.new
      @fact_list ||= {}

      class << self
        private

        def post_resolve(fact_name)
          @fact_list.fetch(fact_name) { read_path_from_env }
        end

        def read_path_from_env
          @fact_list[:path] = ENV['PATH']
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
facter-4.0.15 lib/resolvers/path_resolver.rb
facter-4.0.14 lib/resolvers/path_resolver.rb
facter-4.0.13 lib/resolvers/path_resolver.rb
facter-4.0.12 lib/resolvers/path_resolver.rb
facter-4.0.11 lib/resolvers/path_resolver.rb
facter-4.0.10.pre lib/resolvers/path_resolver.rb
facter-4.0.9.pre lib/resolvers/path_resolver.rb
facter-4.0.8.pre lib/resolvers/path_resolver.rb
facter-4.0.7.pre lib/resolvers/path_resolver.rb