Sha256: ac50c4b9980f6b2908217610552552598e113533ac6709c3f98ee8225957802f
Contents?: true
Size: 439 Bytes
Versions: 17
Compression:
Stored size: 439 Bytes
Contents
require 'tsort' module Xcake class DependencyProvider include TSort def initialize(dependency_class) plugins = dependency_class.load_plugins @dependency_graph = plugins.map do |p| [p, p.dependencies] end.to_h 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
17 entries across 17 versions & 1 rubygems