lib/solve.rb in solve-0.3.0 vs lib/solve.rb in solve-0.3.1
- old
+ new
@@ -1,5 +1,7 @@
+require 'forwardable'
+require 'json'
require 'solve/errors'
# @author Jamie Winsor <jamie@vialstudios.com>
module Solve
autoload :Version, 'solve/version'
@@ -13,16 +15,19 @@
class << self
# 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
+ #
# @param [Solve::Graph] graph
# @param [Array<Solve::Demand>, Array<String, String>] demands
+ # @param [#say, nil] ui
#
# @raise [NoSolutionError]
#
# @return [Hash]
- def it!(graph, demands)
- Solver.new(graph, demands).resolve
+ def it!(graph, demands, ui=nil)
+ Solver.new(graph, demands, ui).resolve
end
end
end