lib/puppet/util/instance_loader.rb
# Retrieve an alread-loaded instance, or attempt to load our instance.
Retrieve an alread-loaded instance, or attempt to load our instance.
Retrieve an alread - loaded instance or attempt to load our instance .
def loaded_instance(type, name)
    name = name.intern
    return nil unless instances = instance_hash(type)
    unless instances.include? name
      if instance_loader(type).load(name)
        unless instances.include? name
          Puppet.warning(
            "Loaded #{type} file for #{name} but #{type} was not defined"
          )
          return nil
        end
      else
        return nil
      end
    end
    instances[name]
  end
def loaded_instance ( type , name ) name = name . intern return nil unless instances = instance_hash ( type ) unless instances . include? name if instance_loader ( type ) . load ( name ) unless instances . include? name Puppet . warning ( "Loaded #{type} file for #{name} but #{type} was not defined" ) return nil end else return nil end end instances [ name ] end
Retrieve an alread-loaded instance, or attempt to load our instance.
Retrieve an alread - loaded instance or attempt to load our instance .
type
<not_specific>
name
<not_specific>