12件ヒット
[1-12件を表示]
(0.078秒)
別のキーワード
検索結果
-
Pathname
# parent -> Pathname (18156.0) -
self の親ディレクトリを指す新しい Pathname オブジェクトを返します。
...{
require "pathname"
path = Pathname("/usr")
path # => #<Pathname:/usr>
path.parent # => #<Pathname:/>
//}
//emlist[例 相対パス][ruby]{
require "pathname"
path = Pathname("foo/bar")
path.parent # => #<Pathname:foo>
path.parent.parent # => #<Pathname:.>
path.parent.......parent.parent # => #<Pathname:..>
//}...