class Gem::PubGrub::Strategy
Public Class Methods
# File lib/rubygems/vendor/pub_grub/lib/pub_grub/strategy.rb, line 3 def initialize(source) @source = source @root_package = Package.root @root_version = Package.root_version @version_indexes = Hash.new do |h,k| if k == @root_package h[k] = { @root_version => 0 } else h[k] = @source.all_versions_for(k).each.with_index.to_h end end end
Public Instance Methods
# File lib/rubygems/vendor/pub_grub/lib/pub_grub/strategy.rb, line 18 def next_package_and_version(unsatisfied) package, range = next_term_to_try_from(unsatisfied) [package, most_preferred_version_of(package, range)] end