# File lib/sugar-high/path.rb, line 16 def dir? File.directory? self end
# File lib/sugar-high/path.rb, line 42 def down lv up_dir = Regexp.escape('../') orig = self.clone lv.times do self.gsub! /^#{up_dir}/, '' return self if self == orig end self end
# File lib/sugar-high/path.rb, line 8 def exists? File.exist? self end
# File lib/sugar-high/path.rb, line 32 def post_down lv up_dir = Regexp.escape('/..') orig = self.clone lv.times do self.gsub! /#{up_dir}$/, '' return self if self == orig end self end
# File lib/sugar-high/path.rb, line 28 def post_up lv self + ('/..' * lv) end
Generated with the Darkfish Rdoc Generator 2.