118件ヒット
[1-100件を表示]
(0.142秒)
種類
- 特異メソッド (50)
- インスタンスメソッド (46)
- モジュール関数 (22)
ライブラリ
- ビルトイン (44)
- open3 (22)
- pathname (11)
-
rubygems
/ dependency _ installer (11) - shell (30)
クラス
- Dir (44)
-
Gem
:: DependencyInstaller (11) - Pathname (11)
- Shell (30)
モジュール
- Open3 (22)
検索結果
先頭5件
-
Shell
# pwd -> String (18201.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Dir
. chdir -> 0 (15218.0) -
カレントディレクトリを path に変更します。
...カレントディレクトリを path に変更します。
path を省略した場合、環境変数 HOME または LOGDIR
が設定されていればそのディレクトリに移動します。
カレントディレクトリの変更に成功すれば 0 を返します。
ブロックが指......h ディレクトリのパスを文字列で指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
Dir.chdir("/var/spool/mail")
p Dir.pwd #=> "/var/spool/mail"
Dir.chdir("/tmp") do
p Dir.pwd #=> "/tmp"
end
p Dir.pwd......#=> "/var/spool/mail"
//}... -
Dir
. chdir {|path| . . . } -> object (15218.0) -
カレントディレクトリを path に変更します。
...カレントディレクトリを path に変更します。
path を省略した場合、環境変数 HOME または LOGDIR
が設定されていればそのディレクトリに移動します。
カレントディレクトリの変更に成功すれば 0 を返します。
ブロックが指......h ディレクトリのパスを文字列で指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
Dir.chdir("/var/spool/mail")
p Dir.pwd #=> "/var/spool/mail"
Dir.chdir("/tmp") do
p Dir.pwd #=> "/tmp"
end
p Dir.pwd......#=> "/var/spool/mail"
//}... -
Dir
. chdir(path) -> 0 (15218.0) -
カレントディレクトリを path に変更します。
...カレントディレクトリを path に変更します。
path を省略した場合、環境変数 HOME または LOGDIR
が設定されていればそのディレクトリに移動します。
カレントディレクトリの変更に成功すれば 0 を返します。
ブロックが指......h ディレクトリのパスを文字列で指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
Dir.chdir("/var/spool/mail")
p Dir.pwd #=> "/var/spool/mail"
Dir.chdir("/tmp") do
p Dir.pwd #=> "/tmp"
end
p Dir.pwd......#=> "/var/spool/mail"
//}... -
Dir
. chdir(path) {|path| . . . } -> object (15218.0) -
カレントディレクトリを path に変更します。
...カレントディレクトリを path に変更します。
path を省略した場合、環境変数 HOME または LOGDIR
が設定されていればそのディレクトリに移動します。
カレントディレクトリの変更に成功すれば 0 を返します。
ブロックが指......h ディレクトリのパスを文字列で指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
Dir.chdir("/var/spool/mail")
p Dir.pwd #=> "/var/spool/mail"
Dir.chdir("/tmp") do
p Dir.pwd #=> "/tmp"
end
p Dir.pwd......#=> "/var/spool/mail"
//}... -
Gem
:: DependencyInstaller # find _ gems _ with _ sources(dep) -> Array (15206.0) -
与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを 返します。
...与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを
返します。
Gem はローカル (Dir.pwd) とリモート (Gem.sources) の両方から検索します。
結果は、バージョンの新しい順が先にきます。また、ロ... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (6206.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.expand_path("../") # => #<Pathname:/path/testfile>
//}
@see File.expand_path... -
Shell
# dir -> String (6101.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Shell
. new(pwd = Dir . pwd , umask = nil) -> Shell (3436.0) -
プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ ブジェクトを生成します.
...ディレクトリをpwd で指定されたディレクトリとするShellオ
ブジェクトを生成します.
@param pwd プロセスのカレントディレクトリをpwd で指定されたディレクトリとします。
指定しない場合は、Dir.pwd が使用されます。... -
Shell
# cwd -> String (3101.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Shell
# getwd -> String (3101.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Open3
. # popen3(*cmd) -> [IO , IO , IO , Thread] (436.0) -
外部プログラム cmd を実行し、そのプロセスの標準入力、標準出力、標準エラー 出力に接続されたパイプと実行したプロセスを待つためのスレッドを 4 要素の 配列で返します。
...パイプと実行したプロセスを待つためのスレッドを 4 要素の
配列で返します。
require 'open3'
stdin, stdout, stderr, wait_thr = *Open3.popen3("/usr/bin/nroff -man")
@param cmd 実行するコマンドを指定します。
@return ブロックを指定した場合......返します。
require 'open3'
Open3.popen3("read stdin; echo stdout; echo stderr >&2") {|stdin, stdout, stderr, wait_thr|
stdin.puts "stdin"
stdin.close # または close_write
p stdout.read
p stderr.read
}
#=> "stdout\n"
"stderr\n"
stdin への入力が終わ......rint o.read
}
#=> ...
foo=1
bar=2
Kernel.#spawnと同様に、引数リストの最後にオプションをハッシュ形式
で指定する事ができます。
例:
require "open3"
# オプションを指定した場合。
Dir.chdir("/tmp")
Open3.popen3("pwd", :chdir...