Sha256: 1c476a849e8d5a4efd4b0469ed5712f59b74fdae6fcd8b48023450fa9f673c55
Contents?: true
Size: 462 Bytes
Versions: 10
Compression:
Stored size: 462 Bytes
Contents
require 'tsort' module Xcake class DependencyProvider include TSort def initialize(dependency_class) plugins = dependency_class.load_plugins @dependency_graph = plugins.each_with_object({}) do |p, hash| hash[p] = p.dependencies end end def tsort_each_node(&block) @dependency_graph.each_key(&block) end def tsort_each_child(node, &block) @dependency_graph[node].each(&block) end end end
Version data entries
10 entries across 10 versions & 1 rubygems