184件ヒット
[1-100件を表示]
(0.088秒)
種類
- 特異メソッド (76)
- インスタンスメソッド (36)
- 文書 (36)
- ライブラリ (24)
- 変数 (12)
ライブラリ
- English (12)
- ビルトイン (64)
- rbconfig (12)
-
rubygems
/ installer (12) -
rubygems
/ specification (12) -
rubygems
/ uninstaller (12)
クラス
- Dir (24)
- File (40)
-
Gem
:: Installer (12) -
Gem
:: Specification (12) -
Gem
:: Uninstaller (12)
キーワード
-
$ ARGV (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
absolute
_ path (12) - dirname (4)
-
gem
_ home (24) - homepage (12)
- irb (12)
- realpath (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
rubygems
/ security (12)
検索結果
先頭5件
-
Dir
. home -> String | nil (18234.0) -
現在のユーザまたは指定されたユーザのホームディレクトリを返します。
...れたユーザのホームディレクトリを返します。
Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。
//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}
@see File.expand_path......されたユーザのホームディレクトリを返します。
Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。
//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}
@see File.expand_path... -
Dir
. home(user) -> String | nil (18234.0) -
現在のユーザまたは指定されたユーザのホームディレクトリを返します。
...れたユーザのホームディレクトリを返します。
Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。
//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}
@see File.expand_path......されたユーザのホームディレクトリを返します。
Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。
//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}
@see File.expand_path... -
Gem
:: Installer # gem _ home -> String (6202.0) -
Gem のインストール先を返します。
Gem のインストール先を返します。 -
Gem
:: Uninstaller # gem _ home -> String (6202.0) -
Gem がインストールされているディレクトリを返します。
Gem がインストールされているディレクトリを返します。 -
Gem
:: Specification # homepage -> String (6201.0) -
この Gem パッケージを作成しているプロジェクトか作成者のウェブサイトの URI を返します。
この Gem パッケージを作成しているプロジェクトか作成者のウェブサイトの URI を返します。 -
ruby 1
. 6 feature (330.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...りました。
p "#{ "" }"
=> ruby 1.6.7 (2002-03-01) [i586-linux]
""
=> -:1: warning: bad substitution in string
ruby 1.6.7 (2002-09-12) [i586-linux]
"#{ }"
=> ruby 1.6.7 (2002-09-25) [i586-linux]
""
これは1.7......ません。1.6に入るかも不明です。-))
: 2002-07-11 String#slice!
範囲外の文字列を指定したときに例外を返す場合がありましたが、常に nil
を返すようになりました。(String#[]やString#slice と同じ結果を返すと
いうことです)......TEXT_PLAIN: text/plain
: Dir.chdir
環境変数 HOME, LOGDIR のいずれも定義されていないとき引数なしの
Dir.chdir で ArgumentError 例外を起こすようになりました
ENV['HOME'] = nil
ENV['LOGDIR'] = nil
Dir.chdir... -
File
. absolute _ path(file _ name , dir _ string=nil) -> String (244.0) -
file_name を絶対パスに変換した文字列を返します。
...name を絶対パスに変換した文字列を返します。
相対パスの場合はカレントディレクトリを基準とします。
dir_string を渡した場合はそのディレクトリを基準とします。
File.expand_path と異なり、 file_name 先頭が "~" である場合......#=> "/home/matz/work/bar"
p ENV["HOME"] #=> "/home/matz"
p File.absolute_path("..") #=> "/home/matz/work"
p File.absolute_path("..", "/tmp") #=> "/"
p File.absolute_path("~") #=> "/home/matz/work/bar/~"
p File.absolute_path("~foo") #=> "/home/matz/work/... -
File
. expand _ path(path , default _ dir = & # 39; . & # 39;) -> String (143.0) -
path を絶対パスに展開した文字列を返します。 path が相対パスであれば default_dir を基準にします。
...変数 HOME が使われます)に、
~USER はそのユーザのホームディレクトリに展開されます。
//emlist[例][ruby]{
p Dir.getwd #=> "/home/matz/work/foo"
p ENV["HOME"] #=> "/home/matz"
p File.expand_path("..") #=> "/home/matz/wor......k"
p File.expand_path("..", "/tmp") #=> "/"
p File.expand_path("~") #=> "/home/matz"
p File.expand_path("~foo") #=> "/home/foo"
//}
@param path パスを表す文字列を指定します。
@param default_dir path が相対パスであれば default_dir を基準に展開されま... -
File
. realpath(pathname , basedir = nil) -> String (125.0) -
与えられた pathname に対応する絶対パスを返します。
...い場合に発生します。
//emlist[例][ruby]{
ENV["HOME"] # => "/home/matz"
File.symlink("testfile", "testlink")
File.realpath("testfile") # => "/home/matz/testfile"
File.realpath("testlink") # => "/home/matz/testfile"
File.realpath("..", "/tmp") # => "/"
/...