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.3.28 lib/pathmagic.rb
runeblog-0.3.27 lib/pathmagic.rb
runeblog-0.3.26 lib/pathmagic.rb
runeblog-0.3.25 lib/pathmagic.rb
runeblog-0.3.24 lib/pathmagic.rb
runeblog-0.3.23 lib/pathmagic.rb
runeblog-0.3.22 lib/pathmagic.rb
runeblog-0.3.21 lib/pathmagic.rb
runeblog-0.3.20 lib/pathmagic.rb
runeblog-0.3.19 lib/pathmagic.rb
runeblog-0.3.18 lib/pathmagic.rb
runeblog-0.3.17 lib/pathmagic.rb
runeblog-0.3.16 lib/pathmagic.rb
runeblog-0.3.15 lib/pathmagic.rb
runeblog-0.3.14 lib/pathmagic.rb
runeblog-0.3.13 lib/pathmagic.rb
runeblog-0.3.12 lib/pathmagic.rb
runeblog-0.3.11 lib/pathmagic.rb
runeblog-0.3.10 lib/pathmagic.rb
runeblog-0.3.08 lib/pathmagic.rb