Class: Chef::Tsorter
Instance Method Summary collapse
-
#initialize(data) ⇒ Tsorter
constructor
A new instance of Tsorter.
- #tsort_each_child(node, &block) ⇒ Object
- #tsort_each_node(&block) ⇒ Object
Constructor Details
#initialize(data) ⇒ Tsorter
Returns a new instance of Tsorter.
8 9 10 |
# File 'lib/chef/tsorter.rb', line 8 def initialize(data) @data = data end |
Instance Method Details
#tsort_each_child(node, &block) ⇒ Object
16 17 18 |
# File 'lib/chef/tsorter.rb', line 16 def tsort_each_child(node, &block) @data.fetch(node).each(&block) end |
#tsort_each_node(&block) ⇒ Object
12 13 14 |
# File 'lib/chef/tsorter.rb', line 12 def tsort_each_node(&block) @data.each_key(&block) end |