method
prepend_prefix
v1_9_2_180 -
Show latest stable
- Class:
Pathname
prepend_prefix(prefix, relpath)private
No documentation available.
# File lib/pathname.rb, line 320
def prepend_prefix(prefix, relpath)
if relpath.empty?
File.dirname(prefix)
elsif /#{SEPARATOR_PAT}/ =~ prefix
prefix = File.dirname(prefix)
prefix = File.join(prefix, "") if File.basename(prefix + 'a') != 'a'
prefix + relpath
else
prefix + relpath
end
end