るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.078秒)

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

クラス

検索結果

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:..>
//}...