Class: Spoom::FileTree::Node

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/spoom/file_tree.rb

Overview

A node representing either a file or a directory inside a FileTree

Instance Method Summary collapse

Instance Method Details

#pathObject

Full path to this node from root : -> String



88
89
90
91
92
93
# File 'lib/spoom/file_tree.rb', line 88

def path
  parent = self.parent
  return name unless parent

  "#{parent.path}/#{name}"
end