Class | Facter::Util::Fact |
In: |
lib/facter/util/fact.rb
|
Parent: | Object |
This class represents a fact. Each fact has a name and multiple {Facter::Util::Resolution resolutions}.
Create facts using {Facter.add}
@api public
ldapname | [RW] | @return [String] @deprecated |
name | [RW] | The name of the fact @return [String] |
Creates a new fact, with no resolution mechanisms. See {Facter.add} for the public API for creating facts. @param name [String] the fact name @param options [Hash] optional parameters @option options [String] :ldapname set the ldapname property on the fact
@api private
Adds a new {Facter::Util::Resolution resolution}. This requires a block, which will then be evaluated in the context of the new resolution.
@param options [Hash] A hash of options to set on the resolution
@return [Facter::Util::Resolution]
@api private
Define a new named resolution or return an existing resolution with the given name.
@param resolution_name [String] The name of the resolve to define or look up @param options [Hash] A hash of options to set on the resolution @return [Facter::Util::Resolution]
@api public
Retrieve an existing resolution by name
@param name [String]
@return [Facter::Util::Resolution, nil] The resolution if exists, nil if
it doesn't exist or name is nil
Returns the value for this fact. This searches all resolutions by suitability and weight (see {Facter::Util::Resolution}). If no suitable resolution is found, it returns nil.
@api public