static public Method

Rake.each_dir_parent(dir) { |dir| ... }

Yield each file or directory component.

Source Code

# File rake.rb, line 1507
def each_dir_parent(dir)
  old_length = nil
  while dir != '.' && dir.length != old_length
    yield(dir)
    old_length = dir.length
    dir = File.dirname(dir)
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.