Sha256: d8c104bef70a894eb8c59170392c82bebd722a24bb74d68ca356c9c0293e64c5
Contents?: true
Size: 1.09 KB
Versions: 92
Compression:
Stored size: 1.09 KB
Contents
module Bundler::Molinillo # A state that a {Resolution} can be in # @attr [String] name # @attr [Array<Object>] requirements # @attr [DependencyGraph] activated # @attr [Object] requirement # @attr [Object] possibility # @attr [Integer] depth # @attr [Set<Object>] conflicts ResolutionState = Struct.new( :name, :requirements, :activated, :requirement, :possibilities, :depth, :conflicts ) # A state that encapsulates a set of {#requirements} with an {Array} of # possibilities class DependencyState < ResolutionState # Removes a possibility from `self` # @return [PossibilityState] a state with a single possibility, # the possibility that was removed from `self` def pop_possibility_state PossibilityState.new( name, requirements.dup, activated.dup, requirement, [possibilities.pop], depth + 1, conflicts.dup ) end end # A state that encapsulates a single possibility to fulfill the given # {#requirement} class PossibilityState < ResolutionState end end
Version data entries
92 entries across 64 versions & 4 rubygems