class Bundler::Resolver::Candidate


specifications that can be installed, written to lock files, and so on.
are used when materializing resolution results back into RubyGems
package they refer to. These candidates are referred to as “canonical” and
Some candidates may also keep some information explicitly about the
considered separately.
same gem version can bring different dependencies, so they need to be
from 1.1.0 (generic). This is because different platform variants of the
platforms. For example, 1.1.0-x86_64-linux is a different resolution candidate
Each Resolver::Candidate has a underlying ‘Gem::Version` plus a set of
resolution complexities into account.
This class is a PubGrub compatible “Version” class that takes Bundler

def <=>(other)

def <=>(other)
  return unless other.is_a?(self.class)
  sort_obj <=> other.sort_obj
end

def ==(other)

def ==(other)
  return unless other.is_a?(self.class)
  sort_obj == other.sort_obj
end

def dependencies

def dependencies
  @spec_group.dependencies
end

def eql?(other)

def eql?(other)
  return unless other.is_a?(self.class)
  sort_obj.eql?(other.sort_obj)
end

def hash

def hash
  sort_obj.hash
end

def initialize(version, group: nil, priority: -1)

def initialize(version, group: nil, priority: -1)
  @spec_group = group || SpecGroup.new([])
  @version = Gem::Version.new(version)
  @priority = priority
end

def prerelease?

def prerelease?
  @version.prerelease?
end

def segments

def segments
  @version.segments
end

def sort_obj

def sort_obj
  [@version, @priority]
end

def to_s

def to_s
  @version.to_s
end

def to_specs(package)

def to_specs(package)
  return [] if package.meta?
  @spec_group.to_specs(package.force_ruby_platform?)
end