Class: Facts::Linux::Kernelversion

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/facts/linux/kernelversion.rb

Constant Summary collapse

FACT_NAME =
'kernelversion'

Instance Method Summary collapse

Instance Method Details

#call_the_resolverObject



8
9
10
11
12
# File 'lib/facter/facts/linux/kernelversion.rb', line 8

def call_the_resolver
  version_numbers = Facter::Resolvers::Uname.resolve(:kernelrelease).scan(/\d+/)
  fact_value = version_numbers[0..2].join('.')
  Facter::ResolvedFact.new(FACT_NAME, fact_value)
end