Class: Facts::Ubuntu::Lsbdistrelease
- Inherits:
-
Object
- Object
- Facts::Ubuntu::Lsbdistrelease
- Defined in:
- lib/facter/facts/ubuntu/lsbdistrelease.rb
Constant Summary collapse
- FACT_NAME =
'lsbdistrelease'
- ALIASES =
%w[lsbmajdistrelease lsbminordistrelease].freeze
- TYPE =
:legacy
Instance Method Summary collapse
Instance Method Details
#call_the_resolver ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/facter/facts/ubuntu/lsbdistrelease.rb', line 10 def call_the_resolver fact_value = Facter::Resolvers::LsbRelease.resolve(:release) return Facter::ResolvedFact.new(FACT_NAME, nil, :legacy) unless fact_value version = fact_value.split('.') [Facter::ResolvedFact.new(FACT_NAME, fact_value, :legacy), Facter::ResolvedFact.new(ALIASES[0], "#{version[0]}.#{version[1]}", :legacy), Facter::ResolvedFact.new(ALIASES[1], version[2], :legacy)] end |