Sha256: 4c8813a0a9209fa8b9ca852d172565caed9f1ce4fc5736f1582453829bd3f700

Contents?: true

Size: 435 Bytes

Versions: 40

Compression:

Stored size: 435 Bytes

Contents

# frozen_string_literal: true

module Facter
  class CoreFact
    def initialize(searched_fact)
      @searched_fact = searched_fact
    end

    def create
      fact_class = @searched_fact.fact_class

      return unless fact_class

      fact_value = nil
      Facter::Framework::Benchmarking::Timer.measure(@searched_fact.name) do
        fact_value = fact_class.new.call_the_resolver
      end

      fact_value
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
facter-4.10.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.9.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.8.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.7.1 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.7.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.6.1 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.6.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.5.2 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.5.1 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.5.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.4.3 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.4.2 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.4.1 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.4.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.3.1 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.3.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.14 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.13 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.12 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.11 lib/facter/framework/core/fact/internal/core_fact.rb