Module: Slashjoin::String

Defined in:
lib/slashjoin/string.rb

Instance Method Summary collapse

Instance Method Details

#/(other) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/slashjoin/string.rb', line 8

def / (other)
  case
  when self =~ ::URI.regexp
    ::URI.join(self, other)
  when Slashjoin::use_pathname?
    ::Pathname.new(self).join(other)
  else
    ::File.join(self, other)
  end
end