Class: Facts::Freebsd::Virtual

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/facts/freebsd/virtual.rb

Constant Summary collapse

FACT_NAME =
'virtual'

Instance Method Summary collapse

Constructor Details

#initializeVirtual

Returns a new instance of Virtual.



8
9
10
# File 'lib/facter/facts/freebsd/virtual.rb', line 8

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

Instance Method Details

#call_the_resolverObject



12
13
14
15
16
17
18
# File 'lib/facter/facts/freebsd/virtual.rb', line 12

def call_the_resolver
  @log.debug('FreeBSD Virtual Resolver')
  fact_value = Facter::Util::Facts::Posix::VirtualDetector.platform
  @log.debug("Fact value is: #{fact_value}")

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