lib/amp/support/support.rb
##
# Returns the path from +root+ to the path represented by the string. Will fail
# if the string is not inside +root+.
# 
# @param [String] root the root from which we want the relative path
# @return [String] the relative path from +root+ to the string itself
Returns the path from +root+ to the path represented by the string. Will fail
if the string is not inside +root+.
Returns the path from + root + to the path represented by the string . Will fail if the string is not inside + root + .
def relative_path(root)
    return '' if self == root
    return self[root.size..-1] if start_with? root
    self 
  end
def relative_path ( root ) return '' if self == root return self [ root . size .. - 1 ] if start_with? root self end
Returns the path from +root+ to the path represented by the string.
Returns the path from + root + to the path represented by the string .
# return a more local path if possible... # else we're outside the repo
the relative path from +root+ to the string itself
the relative path from + root + to the string itself
String
root
<not_specific>
<not_specific>
root the root from which we want the relative path
root the root from which we want the relative path