+

+(other)
Instance Public methods

Appends a pathname fragment to self to produce a new Pathname object.

p1 = Pathname.new("/usr")      # Pathname:/usr
p2 = p1 + "bin/ruby"           # Pathname:/usr/bin/ruby
p3 = p1 + "/etc/passwd"        # Pathname:/etc/passwd

This method doesn't access the file system; it is pure string manipulation.

doc_ruby_on_rails
2015-04-27 17:17:26
Comments
Leave a Comment

Please login to continue.