Method: FunWith::Files::FilePath#ascend

Defined in:
lib/fun_with/files/file_path.rb

#ascend(&block) ⇒ Object



641
642
643
644
645
646
647
648
649
650
# File 'lib/fun_with/files/file_path.rb', line 641

def ascend( &block )
  path = self.clone

  if path.root?
    yield path
  else
    yield self
    self.up.ascend( &block )
  end
end