Sha256: 7793ff4aa771f2a33ff6453a6637b2908288344bf5f93e07d8fd77cec0f6608a

Contents?: true

Size: 253 Bytes

Versions: 91

Compression:

Stored size: 253 Bytes

Contents

module PathSep
  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
end

String.include(PathSep)
Symbol.include(PathSep)

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
runeblog-0.2.43 lib/pathmagic.rb
runeblog-0.2.42 lib/pathmagic.rb
runeblog-0.2.41 lib/pathmagic.rb
runeblog-0.2.40 lib/pathmagic.rb
runeblog-0.2.39 lib/pathmagic.rb
runeblog-0.2.38 lib/pathmagic.rb
runeblog-0.2.37 lib/pathmagic.rb
runeblog-0.2.36 lib/pathmagic.rb
runeblog-0.2.35 lib/pathmagic.rb
runeblog-0.2.34 lib/pathmagic.rb
runeblog-0.2.33 lib/pathmagic.rb