Sha256: a984d330d2087bfe0099c0f23337294dd78301f18fe21dd9bf0096fe4b3f4524

Contents?: true

Size: 592 Bytes

Versions: 29

Compression:

Stored size: 592 Bytes

Contents

# frozen_string_literal: true

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

      class << self
        private

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

        def retrieve_ruby_information(fact_name)
          @fact_list[:sitedir] = RbConfig::CONFIG['sitelibdir']
          @fact_list[:platform] = RUBY_PLATFORM
          @fact_list[:version] = RUBY_VERSION
          @fact_list[fact_name]
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
facter-4.0.36 lib/facter/resolvers/ruby_resolver.rb
facter-4.0.35 lib/facter/resolvers/ruby_resolver.rb
facter-4.0.34 lib/facter/resolvers/ruby_resolver.rb
facter-4.0.33 lib/facter/resolvers/ruby_resolver.rb
facter-4.0.32 lib/facter/resolvers/ruby_resolver.rb
facter-4.0.31 lib/facter/resolvers/ruby_resolver.rb
facter-4.0.30 lib/facter/resolvers/ruby_resolver.rb
facter-4.0.29 lib/resolvers/ruby_resolver.rb
facter-4.0.28 lib/resolvers/ruby_resolver.rb
facter-4.0.26 lib/resolvers/ruby_resolver.rb
facter-4.0.25 lib/resolvers/ruby_resolver.rb
facter-4.0.24 lib/resolvers/ruby_resolver.rb
facter-4.0.23 lib/resolvers/ruby_resolver.rb
facter-4.0.22 lib/resolvers/ruby_resolver.rb
facter-4.0.21 lib/resolvers/ruby_resolver.rb
facter-4.0.20 lib/resolvers/ruby_resolver.rb
facter-4.0.19 lib/resolvers/ruby_resolver.rb
facter-4.0.18 lib/resolvers/ruby_resolver.rb
facter-4.0.17 lib/resolvers/ruby_resolver.rb
facter-4.0.16 lib/resolvers/ruby_resolver.rb