Module: FFFS::Node
Instance Method Summary collapse
Instance Method Details
#path ⇒ Object
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 |