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.2.10 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.9 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.8 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.7 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.6 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.5 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.4 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.3 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.2 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.1 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.2.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.1.1 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.1.0 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.0.52 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.0.51 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.0.50 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.0.49 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.0.48 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.0.47 lib/facter/framework/core/fact/internal/core_fact.rb
facter-4.0.46 lib/facter/framework/core/fact/internal/core_fact.rb