Module: FFFS::Node

Included in:
Directory, File
Defined in:
lib/fffs/node.rb

Instance Method Summary collapse

Instance Method Details

#pathObject



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/fffs/node.rb', line 23

def path
  path    = []
  current = self

  begin
    path   << current.name
    current = current.parent
  end while current != current.parent

  "/#{path.reverse.join('/')}".sub(%r{/*/}, '/')
end