method
join
v1_9_1_378 -
Show latest stable
- Class:
Pathname
join(*args)public
Pathname#join joins pathnames.
path0.join(path1, ..., pathN) is the same as path0 + path1 + ... + pathN.
# File lib/pathname.rb, line 667
def join(*args)
args.unshift self
result = args.pop
result = Pathname.new(result) unless Pathname === result
return result if result.absolute?
args.reverse_each {|arg|
arg = Pathname.new(arg) unless Pathname === arg
result = arg + result
return result if result.absolute?
}
result
end Related methods
- Instance methods
- +
- <=>
- ==
- ===
- TO_PATH
- absolute?
- ascend
- atime
- basename
- blockdev?
- chardev?
- chdir
- children
- chmod
- chown
- chroot
- cleanpath
- ctime
- delete
- descend
- dir_foreach
- directory?
- dirname
- each_entry
- each_filename
- each_line
- entries
- eql?
- executable?
- executable_real?
- exist?
- expand_path
- extname
- file?
- find
- fnmatch
- fnmatch?
- foreach
- foreachline
- freeze
- ftype
- grpowned?
- hash
- inspect
- join
- lchmod
- lchown
- link
- lstat
- make_link
- make_symlink
- mkdir
- mkpath
- mountpoint?
- mtime
- open
- opendir
- owned?
- parent
- pipe?
- read
- readable?
- readable_real?
- readlines
- readlink
- realpath
- relative?
- relative_path_from
- rename
- rmdir
- rmtree
- root?
- setgid?
- setuid?
- size
- size?
- socket?
- split
- stat
- sticky?
- sub
- sub_ext
- symlink
- symlink?
- sysopen
- taint
- to_s
- truncate
- unlink
- untaint
- utime
- world_readable?
- world_writable?
- writable?
- writable_real?
- zero?
- Class methods
- getwd
- glob
- new
- pwd
- Private methods
-
add_trailing_separator -
chop_basename -
cleanpath_aggressive -
cleanpath_conservative -
del_trailing_separator -
has_trailing_separator? -
plus -
prepend_prefix -
realpath_rec -
split_names