lib/dagwood/dependency_graph.rb
# Returns a new graph containing all dependencies from this graph and the given graph.
# If both graphs depend on the same item, but that item's sub-dependencies differ, the
# resulting graph will depend on the union of both.
Returns a new graph containing all dependencies from this graph and the given graph.
If both graphs depend on the same item, but that item's sub-dependencies differ, the
resulting graph will depend on the union of both.
Returns a new graph containing all dependencies from this graph and the given graph . If both graphs depend on the same item but that item ' s sub - dependencies differ the resulting graph will depend on the union of both .
def merge(other)
      all_dependencies = {}
      (dependencies.keys | other.dependencies.keys).each do |key|
        all_dependencies[key] = dependencies[key] | other.dependencies[key]
      end
      self.class.new all_dependencies
    end
def merge ( other ) all_dependencies = { } ( dependencies . keys | other . dependencies . keys ) . each do | key | all_dependencies [ key ] = dependencies [ key ] | other . dependencies [ key ] end self . class . new all_dependencies end
Returns a new graph containing all dependencies from this graph and the given graph.
Returns a new graph containing all dependencies from this graph and the given graph .
other
<not_specific>