るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.058秒)
トップページ > クエリ:new[x] > 種類:特異メソッド[x] > バージョン:2.2.0[x] > クラス:Pathname[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

キーワード

検索結果

Pathname.new(path) -> Pathname (54328.0)

文字列 path を元に Pathname オブジェクトを生成します。

...文字列 path を元に Pathname オブジェクトを生成します。

@param path 文字列、または類似のオブジェクトを与えます。
実際には to_str に反応するオブジェクトなら何でも構いません。

@raise ArgumentError path が \0 を含んで...
...いると発生します。

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

Pathname
.new(__FILE__) # => #<Pathname:/path/to/file.rb>
//}...

Pathname.getwd -> Pathname (55.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.pwd -> Pathname (55.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...