module PathSep
Public Instance Methods
/(right)
click to toggle source
# File lib/pathmagic.rb, line 2 def /(right) s1 = self.to_s.dup s2 = right.to_s.dup s1 << "/" unless s1.end_with?("/") || s2.start_with?("/") path = s1 + s2 path.gsub!("//", "/") path end