Sha256: e5caa419ad46a8383f6ba1f2989c9ca257a83874d4b692bdc48ac021e3f06cf3

Contents?: true

Size: 470 Bytes

Versions: 5

Compression:

Stored size: 470 Bytes

Contents

# frozen_string_literal: true

module Facts
  module Linux
    class Virtual
      FACT_NAME = 'virtual'

      def initialize
        @log = Facter::Log.new(self)
        @virtual = Facter::VirtualDetector.new
      end

      def call_the_resolver
        @log.debug('Linux Virtual Resolver')
        fact_value = @virtual.platform
        @log.debug("Fact value is: #{fact_value}")

        Facter::ResolvedFact.new(FACT_NAME, fact_value)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
facter-4.0.46 lib/facter/facts/linux/virtual.rb
facter-4.0.44 lib/facter/facts/linux/virtual.rb
facter-4.0.43 lib/facter/facts/linux/virtual.rb
facter-4.0.42 lib/facter/facts/linux/virtual.rb
facter-4.0.41 lib/facter/facts/linux/virtual.rb