Class: Facter::FactLoader
- Inherits:
-
Object
- Object
- Facter::FactLoader
- Includes:
- Singleton
- Defined in:
- lib/facter/framework/core/fact_loaders/fact_loader.rb
Instance Attribute Summary collapse
-
#external_facts ⇒ Object
readonly
Returns the value of attribute external_facts.
-
#facts ⇒ Object
readonly
Returns the value of attribute facts.
-
#internal_facts ⇒ Object
readonly
Returns the value of attribute internal_facts.
Instance Method Summary collapse
-
#initialize ⇒ FactLoader
constructor
A new instance of FactLoader.
- #load(options) ⇒ Object
Constructor Details
#initialize ⇒ FactLoader
Returns a new instance of FactLoader.
9 10 11 12 13 14 15 |
# File 'lib/facter/framework/core/fact_loaders/fact_loader.rb', line 9 def initialize @log = Log.new(self) @internal_facts = [] @external_facts = [] @facts = [] end |
Instance Attribute Details
#external_facts ⇒ Object (readonly)
Returns the value of attribute external_facts.
7 8 9 |
# File 'lib/facter/framework/core/fact_loaders/fact_loader.rb', line 7 def external_facts @external_facts end |
#facts ⇒ Object (readonly)
Returns the value of attribute facts.
7 8 9 |
# File 'lib/facter/framework/core/fact_loaders/fact_loader.rb', line 7 def facts @facts end |
#internal_facts ⇒ Object (readonly)
Returns the value of attribute internal_facts.
7 8 9 |
# File 'lib/facter/framework/core/fact_loaders/fact_loader.rb', line 7 def internal_facts @internal_facts end |
Instance Method Details
#load(options) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/facter/framework/core/fact_loaders/fact_loader.rb', line 17 def load() @internal_loader ||= InternalFactLoader.new @external_fact_loader ||= ExternalFactLoader.new @facts = [] @external_facts = [] @internal_facts = load_internal_facts() @external_facts = load_external_facts() filter_env_facts @facts = @internal_facts + @external_facts end |