Class: Spoom::FileTree::Node

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
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



105
106
107
108
109
# File 'lib/spoom/file_tree.rb', line 105

def path
  parent = self.parent
  return name unless parent
  "#{parent.path}/#{name}"
end