lib/chef/provider/package.rb
# Returns the package versions which need to be modified.  If the resource was called with an array of packages
# then this will return an array of versions to update (may have 0 or 1 entries).  If the resource was called
# with a non-array package_name to manage then this will return a string rather than an Array.  The output
# of this is meant to be fed into subclass interfaces to install/upgrade packages and not all of them are
# Array-aware.
#
# @return [String, Array<String>] package version(s) to actually update/install
Returns the package versions which need to be modified.  If the resource was called with an array of packages
then this will return an array of versions to update (may have 0 or 1 entries).  If the resource was called
with a non-array package_name to manage then this will return a string rather than an Array.  The output
of this is meant to be fed into subclass interfaces to install/upgrade packages and not all of them are
Array-aware.
Returns the package versions which need to be modified . If the resource was called with an array of packages then this will return an array of versions to update ( may have 0 or 1 entries ) . If the resource was called with a non - array package_name to manage then this will return a string rather than an Array . The output of this is meant to be fed into subclass interfaces to install / upgrade packages and not all of them are Array - aware .
def versions_for_targets
        versions_for_targets = []
        target_version_array.each_with_index do |target_version, i|
          if !target_version.nil?
            versions_for_targets.push(target_version)
          else
            versions_for_targets.push(nil) if allow_nils?
          end
        end
        multipackage? ? versions_for_targets : versions_for_targets[0]
      end
def versions_for_targets versions_for_targets = [ ] target_version_array . each_with_index do | target_version , i | if ! target_version . nil? versions_for_targets . push ( target_version ) else versions_for_targets . push ( nil ) if allow_nils? end end multipackage? ? versions_for_targets : versions_for_targets [ 0 ] end
Returns the package versions which need to be modified.
Returns the package versions which need to be modified .
package version(s) to actually update/install
package version ( s ) to actually update / install
String, Array<String>