Module: FSSM::Cache::Common
Instance Method Summary collapse
Instance Method Details
#each(prefix = './', &block) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/vendor/fssm/cache.rb', line 9 def each(prefix='./', &block) @children.each do |segment, node| cprefix = Pathname.for(prefix.dup).join(segment) block.call(cprefix, node) node.each(cprefix, &block) end end |
#initialize ⇒ Object
5 6 7 |
# File 'lib/vendor/fssm/cache.rb', line 5 def initialize @children = Hash.new end |