parent -> Pathname
[permalink][rdoc][edit]-
self の親ディレクトリを指す新しい Pathname オブジェクトを返します。
require "pathname" path = Pathname("/usr") path # => #<Pathname:/usr> path.parent # => #<Pathname:/>
require "pathname" path = Pathname("foo/bar") path.parent # => #<Pathname:foo> path.parent.parent # => #<Pathname:.> path.parent.parent.parent # => #<Pathname:..>