Class: Facter::InternalFactLoader
- Inherits:
-
Object
- Object
- Facter::InternalFactLoader
- Defined in:
- lib/facter/framework/core/fact_loaders/internal_fact_loader.rb
Instance Attribute Summary collapse
-
#facts ⇒ Object
readonly
Returns the value of attribute facts.
Instance Method Summary collapse
- #core_facts ⇒ Object
-
#initialize(os_descendents = nil) ⇒ InternalFactLoader
constructor
A new instance of InternalFactLoader.
- #legacy_facts ⇒ Object
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
#facts ⇒ Object (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_facts ⇒ Object
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_facts ⇒ Object
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 |