Module: FSSM::Tree::NodeEnumerable
Instance Method Summary collapse
Methods included from NodeBase
Instance Method Details
#each(prefix = nil, &block) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/fssm/tree.rb', line 34 def each(prefix=nil, &block) @children.each do |segment, node| cprefix = prefix ? FSSM::Pathname.for(prefix).join(segment) : FSSM::Pathname.for(segment) block.call(cprefix, node) node.each(cprefix, &block) end end |