Class: Molinillo::Resolver::Resolution::PossibilitySet

Inherits:
Struct
  • Object
show all
Defined in:
lib/molinillo/resolution.rb,
lib/molinillo/resolution.rb

Overview

A collection of possibility states that share the same dependencies

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dependenciesArray

the dependencies for this set of possibilities

Returns:

  • (Array)

    the current value of dependencies



41
42
43
# File 'lib/molinillo/resolution.rb', line 41

def dependencies
  @dependencies
end

#possibilitiesArray

the possibilities

Returns:

  • (Array)

    the current value of possibilities



41
42
43
# File 'lib/molinillo/resolution.rb', line 41

def possibilities
  @possibilities
end

Instance Method Details

#latest_versionObject

Returns most up-to-date dependency in the possibility set.

Returns:

  • (Object)

    most up-to-date dependency in the possibility set



50
51
52
# File 'lib/molinillo/resolution.rb', line 50

def latest_version
  possibilities.last
end

#to_sObject

String representation of the possibility set, for debugging



45
46
47
# File 'lib/molinillo/resolution.rb', line 45

def to_s
  "[#{possibilities.join(', ')}]"
end