Module: FSSM::Cache::Common

Includes:
Enumerable
Included in:
FSSM::Cache, Node
Defined in:
lib/vendor/fssm/cache.rb

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

#initializeObject



5
6
7
# File 'lib/vendor/fssm/cache.rb', line 5

def initialize
  @children = Hash.new
end