Class: Pathname
- Inherits:
-
Object
- Object
- Pathname
- Defined in:
- lib/ruby/pathname.rb,
lib/ruby/pathname_windows.rb
Instance Method Summary collapse
Instance Method Details
#join(*args) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ruby/pathname.rb', line 6 def join(*args) last = args.last if last.to_s[0] == File::SEPARATOR if last.is_a? Pathname last else Pathname.new last end else Pathname.new(File.join @path, *args.map(&:to_s)) end end |
#relative? ⇒ Boolean
2 3 4 |
# File 'lib/ruby/pathname.rb', line 2 def relative? @path[0] != File::SEPARATOR end |