るりまサーチ

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

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

クラス

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

CGI::Cookie#path -> String (24202.0)

クッキーを適用するパスを返します。

クッキーを適用するパスを返します。

Gem::ConfigFile#path -> String (24202.0)

Gem を探索するパスを返します。

Gem を探索するパスを返します。

PStore#path -> String (24202.0)

データベースのファイル名を得ます。

データベースのファイル名を得ます。

SyntaxError#path -> String (24202.0)

文法エラーがあったファイルのパスを返します。

文法エラーがあったファイルのパスを返します。

WEBrick::HTTPRequest#path -> String (24202.0)

リクエスト URI のパスを表す文字列を返します。

リクエスト URI のパスを表す文字列を返します。

絞り込み条件を変える

ARGF.class#path -> String (21202.0)

現在開いている処理対象のファイル名を返します。

...は - を返します。
組み込み変数 $FILENAME と同じです。

$ echo "foo" > foo
$ echo "bar" > bar
$ echo "glark" > glark

$ ruby argf.rb foo bar glark

A
RGF.filename # => "foo"
A
RGF.read(5) # => "foo\nb"
A
RGF.filename # => "bar"
A
RGF.skip
A
RGF.filename # => "glark"...

Pathname#expand_path(default_dir = &#39;.&#39;) -> Pathname (18372.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")
Path
name.pwd # => #<Pathname:/path/to>
path
.expand_...
...path # => #<Pathname:/path/to/testfile>
path
.expand_path("../") # => #<Pathname:/path/testfile>
//}

@see File.expand_path...

Pathname#cleanpath(consider_symlink = false) -> Pathname (18337.0)

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

...余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

cleanpath は、実際にファイルシステムを参照することなく、文字列操作
だけで処理を行います。

@param consider_symlink 真ならパス要素にシンボリック...
...ist[例][ruby]{
require "pathname"
path
= Pathname.new("//.././../")
path
# => #<Pathname://.././../>
path
.cleanpath # => #<Pathname:/>


require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir....
...mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path
= Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")

path
.cleanpath # => #<Pathname:bar/bar>
path
.cleanpath(true) # => #<Pathname:bar/foo/../bar>
//}...

Pathname#realdirpath(basedir = nil) -> Pathname (18331.0)

Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。

...
Path
name#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。

@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。

//emlist[例][ruby]{
require "pathna...
...me"

path
= Pathname("/not_exist")
path
.realdirpath # => #<Pathname:/not_exist>
path
.realpath # => Errno::ENOENT

# 最後ではないコンポーネント(/not_exist_1)も存在しないのでエラーになる。
path
= Pathname("/not_exist_1/not_exist_2")
path
.realdirpath # => Errno::ENOENT...
...//}

@see Pathname#realpath...

CGI::QueryExtension#path_translated -> String (18318.0)

ENV['PATH_TRANSLATED'] を返します。

...ENV['PATH_TRANSLATED'] を返します。...

絞り込み条件を変える

<< < 1 2 3 4 5 ... > >>