種類
- 特異メソッド (72)
- インスタンスメソッド (68)
- モジュール関数 (22)
- ライブラリ (11)
ライブラリ
クラス
- Dir (66)
-
Gem
:: DependencyInstaller (11) -
Net
:: FTP (22) - Pathname (11)
- Shell (30)
モジュール
- Open3 (22)
キーワード
- chdir (44)
- cwd (6)
- dir (6)
-
find
_ gems _ with _ sources (11) - getdir (11)
- getwd (17)
- new (6)
- popen3 (22)
-
rdoc
/ generator / json _ index (11)
検索結果
先頭5件
-
Gem
:: DependencyInstaller # find _ gems _ with _ sources(dep) -> Array (9112.0) -
与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを 返します。
...与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを
返します。
Gem はローカル (Dir.pwd) とリモート (Gem.sources) の両方から検索します。
結果は、バージョンの新しい順が先にきます。また、ロ... -
Shell
# dir -> String (6202.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
rdoc
/ generator / json _ index (6012.0) -
他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。
...This generator is derived from sdoc by Vladimir Kolesnikov and
contains verbatim code written by him.
このジェネレータは HTML ジェネレータと一緒に使うために設計されています。:
class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir......= Pathname.pwd.expand_path
@json_index = RDoc::Generator::JsonIndex.new self, options
end
def generate
# ...
@json_index.generate
end
end
=== インデックスフォーマット
検索用のインデックスは JSON ファイルに出力されます。search_dat......_data = {
"index": {
"searchIndex":
["a", "b", ...],
"longSearchIndex":
["a", "a::b", ...],
"info": [
["A", "A", "A.html", "", ""],
["B", "A::B", "A::B.html", "", ""],
...
]
}
}
searchIndex、longSearchIndex、info 中の情... -
Shell
. new(pwd = Dir . pwd , umask = nil) -> Shell (443.0) -
プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ ブジェクトを生成します.
...ディレクトリをpwd で指定されたディレクトリとするShellオ
ブジェクトを生成します.
@param pwd プロセスのカレントディレクトリをpwd で指定されたディレクトリとします。
指定しない場合は、Dir.pwd が使用されます。... -
Open3
. # popen3(*cmd) -> [IO , IO , IO , Thread] (348.0) -
外部プログラム cmd を実行し、そのプロセスの標準入力、標準出力、標準エラー 出力に接続されたパイプと実行したプロセスを待つためのスレッドを 4 要素の 配列で返します。
...パイプと実行したプロセスを待つためのスレッドを 4 要素の
配列で返します。
require 'open3'
stdin, stdout, stderr, wait_thr = *Open3.popen3("/usr/bin/nroff -man")
@param cmd 実行するコマンドを指定します。
@return ブロックを指定した場合......) {|i, o, e, t|
i.close
print o.read
}
#=> ...
foo=1
bar=2
Kernel.#spawnと同様に、引数リストの最後にオプションをハッシュ形式
で指定する事ができます。
例:
require "open3"
# オプションを指定した場合。
Dir.chdir("/t......mp")
Open3.popen3("pwd", :chdir=> "/") {|i,o,e,t|
p o.read.chomp #=> "/"
}
# オプションを指定しない場合。
Dir.chdir("/tmp")
Open3.popen3("pwd") {|i,o,e,t|
p o.read.chomp #=> "/tmp"
}
@see Kernel.#spawn... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (219.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... -
Open3
. # popen3(*cmd) {|stdin , stdout , stderr , wait _ thr| . . . } -> () (148.0) -
外部プログラム cmd を実行し、そのプロセスの標準入力、標準出力、標準エラー 出力に接続されたパイプと実行したプロセスを待つためのスレッドを 4 要素の 配列で返します。
...パイプと実行したプロセスを待つためのスレッドを 4 要素の
配列で返します。
require 'open3'
stdin, stdout, stderr, wait_thr = *Open3.popen3("/usr/bin/nroff -man")
@param cmd 実行するコマンドを指定します。
@return ブロックを指定した場合......) {|i, o, e, t|
i.close
print o.read
}
#=> ...
foo=1
bar=2
Kernel.#spawnと同様に、引数リストの最後にオプションをハッシュ形式
で指定する事ができます。
例:
require "open3"
# オプションを指定した場合。
Dir.chdir("/t......mp")
Open3.popen3("pwd", :chdir=> "/") {|i,o,e,t|
p o.read.chomp #=> "/"
}
# オプションを指定しない場合。
Dir.chdir("/tmp")
Open3.popen3("pwd") {|i,o,e,t|
p o.read.chomp #=> "/tmp"
}
@see Kernel.#spawn... -
Shell
# cwd -> String (102.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Shell
# getwd -> String (102.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...