Class: Facter::InternalFactLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/framework/core/fact_loaders/internal_fact_loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(os_descendents = nil) ⇒ InternalFactLoader

Returns a new instance of InternalFactLoader.



15
16
17
18
19
20
# File 'lib/facter/framework/core/fact_loaders/internal_fact_loader.rb', line 15

def initialize(os_descendents = nil)
  @facts = []

  os_descendents ||= OsDetector.instance.hierarchy
  load_all_oses_in_descending_order(os_descendents)
end

Instance Attribute Details

#factsObject (readonly)

Returns the value of attribute facts.



5
6
7
# File 'lib/facter/framework/core/fact_loaders/internal_fact_loader.rb', line 5

def facts
  @facts
end

Instance Method Details

#core_factsObject



7
8
9
# File 'lib/facter/framework/core/fact_loaders/internal_fact_loader.rb', line 7

def core_facts
  @facts.select { |fact| fact.type == :core }
end

#legacy_factsObject



11
12
13
# File 'lib/facter/framework/core/fact_loaders/internal_fact_loader.rb', line 11

def legacy_facts
  @facts.select { |fact| fact.type == :legacy }
end