るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.063秒)
トップページ > クエリ:>[x] > クエリ:name[x] > バージョン:2.3.0[x] > クエリ:pwd[x]

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. module >
  4. float >
  5. complex >

ライブラリ

クラス

キーワード

検索結果

Pathname.pwd -> Pathname (54922.0)

カレントディレクトリを元に Pathname オブジェクトを生成します。 Pathname.new(Dir.getwd) と同じです。

カレントディレクトリを元に Pathname オブジェクトを生成します。
Pathname.new(Dir.getwd) と同じです。

//emlist[例][ruby]{
require "pathname"

Pathname.getwd #=> #<Pathname:/home/zzak/projects/ruby>
//}

@see Dir.getwd

Pathname#expand_path(default_dir = &#39;.&#39;) -> Pathname (9673.0)

Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

@param default_dir self が相対パスであれば default_dir を基準に展開されます。

//emlist[例][ruby]{
require "pathname"

path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_path # => #<Pathname:/path/to/testfile>
path.e...

Pathname.getwd -> Pathname (9622.0)

カレントディレクトリを元に Pathname オブジェクトを生成します。 Pathname.new(Dir.getwd) と同じです。

カレントディレクトリを元に Pathname オブジェクトを生成します。
Pathname.new(Dir.getwd) と同じです。

//emlist[例][ruby]{
require "pathname"

Pathname.getwd #=> #<Pathname:/home/zzak/projects/ruby>
//}

@see Dir.getwd