brew/Library/Homebrew/cask/topological_hash.rb
Mike McQuaid 90b3a13909
cask: move cask/lib/hbc/* to cask/*.
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01:00

15 lines
243 B
Ruby

require "tsort"
# a basic topologically sortable hashmap
module Hbc
class TopologicalHash < Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end
end