This method is deprecated or moved on the latest stable version.
The last existing version (v2_2_9) is shown here.
pathmap_partial(n)
public
Extract a partial path from the path. Includen directories from
the front end (left hand side) if n is positive. Include |n| directories from
the back end (right hand side) if n is negative.
# File lib/rake/ext/string.rb, line 38
def pathmap_partial(n)
dirs = File.dirname(self).pathmap_explode
partial_dirs =
if n > 0
dirs[0...n]
elsif n < 0
dirs.reverse[0...-n].reverse
else
"."
end
File.join(partial_dirs)
end