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



108
109
110
111
112
113
# File 'lib/spoom/file_tree.rb', line 108

def path
  parent = self.parent
  return name unless parent

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