Sha256: 8ea918b40c6cc15f221b6ece3c8ba6e433a7716512c741d80bba1d6ab770be8d

Contents?: true

Size: 428 Bytes

Versions: 7

Compression:

Stored size: 428 Bytes

Contents

# frozen_string_literal: true

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

      class << self
        private

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

        def read_version_file
          @fact_list[:facterversion] = Facter::VERSION
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
facter-4.0.36 lib/facter/resolvers/facterversion_resolver.rb
facter-4.0.35 lib/facter/resolvers/facterversion_resolver.rb
facter-4.0.34 lib/facter/resolvers/facterversion_resolver.rb
facter-4.0.33 lib/facter/resolvers/facterversion_resolver.rb
facter-4.0.32 lib/facter/resolvers/facterversion_resolver.rb
facter-4.0.31 lib/facter/resolvers/facterversion_resolver.rb
facter-4.0.30 lib/facter/resolvers/facterversion_resolver.rb