Module: Solve

Defined in:
lib/solve.rb,
lib/solve/graph.rb,
lib/solve/demand.rb,
lib/solve/errors.rb,
lib/solve/solver.rb,
lib/solve/version.rb,
lib/solve/artifact.rb,
lib/solve/constraint.rb,
lib/solve/dependency.rb,
lib/solve/gem_version.rb,
lib/solve/solver/serializer.rb,
lib/solve/solver/variable_row.rb,
lib/solve/solver/constraint_row.rb,
lib/solve/solver/variable_table.rb,
lib/solve/solver/constraint_table.rb

Overview

Author:

Defined Under Namespace

Modules: Errors Classes: Artifact, Constraint, Demand, Dependency, Graph, Solver, Version

Constant Summary collapse

VERSION =
"0.4.2"

Class Method Summary collapse

Class Method Details

.it!(graph, demands, ui = nil) ⇒ Hash

A quick solve. Given the “world” as we know it (the graph) and a list of requirements (demands) which must be met. Return me the best solution of artifacts and verisons that I should use.

If a ui object is passed in, the resolution will be traced

Parameters:

Returns:

  • (Hash)

Raises:

  • (NoSolutionError)


29
30
31
# File 'lib/solve.rb', line 29

def it!(graph, demands, ui = nil)
  Solver.new(graph, demands, ui).resolve
end