lib/custom_facts/util/collection.rb
def define_fact(name, options = {}, &block)
        fact = create_or_return_fact(name, options)

        fact.instance_eval(&block) if block_given?

        fact
      rescue StandardError => e
        Facter.log_exception(e, "Unable to add fact #{name}: #{e}")
      end
# 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
Define a new fact or extend an existing fact.
Define a new fact or extend an existing fact .
def define_fact(name, options = {}, &block)
        fact = create_or_return_fact(name, options)
        fact.instance_eval(&block) if block_given?
        fact
      rescue StandardError => e
        Facter.log_exception(e, "Unable to add fact #{name}: #{e}")
      end
def define_fact ( name , options = { } , & block ) fact = create_or_return_fact ( name , options ) fact . instance_eval ( & block ) if block_given? fact rescue StandardError => e Facter . log_exception ( e , "Unable to add fact #{name}: #{e}" ) end
Define a new fact or extend an existing fact.
Define a new fact or extend an existing fact .
The fact that was defined
The fact that was defined
Facter::Util::Fact
name
The name of the fact to define
The name of the fact to define
options
A hash of options to set on the fact
A hash of options to set on the fact
block