Class Facter::Util::Collection
In: lib/facter/util/collection.rb
Parent: Object

Manage which facts exist and how we access them. Largely just a wrapper around a hash of facts.

@api private

Methods

[]   add   define_fact   each   external_loader   fact   flush   internal_loader   list   load   load_all   new   to_hash   value  

Included Modules

Enumerable

Public Class methods

Public Instance methods

Return a fact object by name.

Add a resolution mechanism for a named fact. This does not distinguish between adding a new fact and adding a new way to resolve a fact.

@param name [Symbol] The name of the fact to define @param options [Hash] A hash of options to set on the fact and resolution

@return [Facter::Util::Fact] The fact that was defined

Define a new fact or extend an existing fact.

@param name [Symbol] The name of the fact to define @param options [Hash] A hash of options to set on the fact

@return [Facter::Util::Fact] The fact that was defined

Iterate across all of the facts.

Return a fact by name.

Flush all cached values.

Return a list of all of the facts.

Load all known facts.

Return a hash of all of our facts.

[Validate]