chocolatey/lib/puppet/provider/package/chocolatey.rb
# from puppet-dev mailing list
# Puppet will call the query method on the instance of the package
# provider resource when checking if the package is installed already or
# not.
# It's a determination for one specific package, the package modeled by
# the resource the method is called on.
# Query provides the information for the single package identified by @Resource[:name].
from puppet-dev mailing list
Puppet will call the query method on the instance of the package
provider resource when checking if the package is installed already or
not.
It's a determination for one specific package, the package modeled by
the resource the method is called on.
Query provides the information for the single package identified by @Resource[:name].
from puppet - dev mailing list Puppet will call the query method on the instance of the package provider resource when checking if the package is installed already or not . It ' s a determination for one specific package the package modeled by the resource the method is called on . Query provides the information for the single package identified by @Resource [ : name ] .
def query
    self.class.instances.each do |package|
      return package.properties if @resource[:name][/\A\S*/].downcase == package.name.downcase
    end
    return nil
  end
def query self . class . instances . each do | package | return package . properties if @resource [ :name ] [ / \A \S * / ] . downcase == package . name . downcase end return nil end
from puppet-dev mailing list
Puppet will call the query method on the instance of the package
provider resource when checking if the package is installed already or
not.
from puppet - dev mailing list Puppet will call the query method on the instance of the package provider resource when checking if the package is installed already or not .