168件ヒット
[1-100件を表示]
(0.055秒)
種類
- 特異メソッド (69)
- インスタンスメソッド (33)
- 文書 (33)
- ライブラリ (22)
- 変数 (11)
ライブラリ
- English (11)
- ビルトイン (58)
- rbconfig (11)
-
rubygems
/ installer (11) -
rubygems
/ specification (11) -
rubygems
/ uninstaller (11)
クラス
- Dir (22)
- File (36)
-
Gem
:: Installer (11) -
Gem
:: Specification (11) -
Gem
:: Uninstaller (11)
キーワード
-
$ ARGV (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
absolute
_ path (11) - dirname (3)
-
gem
_ home (22) - homepage (11)
- irb (11)
- realpath (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
rubygems
/ security (11)
検索結果
先頭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") # => "/"
/... -
File
. dirname(filename , level=1) -> String (119.0) -
filename の一番後ろのスラッシュより前を文 字列として返します。スラッシュを含まないファイル名に対しては "."(カレントディレクトリ)を返します。
...後のlevel個を取り除いた文字列を返します。
//emlist[levelを指定する例][ruby]{
File.dirname("/home/gumby/work/ruby.rb", 2) # => "/home/gumby"
File.dirname("/home/gumby/work/ruby.rb", 4) # => "/"
//}
@param filename ファイル名を表す文字列を指定します。
@param...