ライブラリ
- ビルトイン (143)
- benchmark (33)
- fileutils (11)
- matrix (11)
- mkmf (11)
- pty (44)
- readline (11)
-
rexml
/ document (55) -
rexml
/ sax2listener (22) -
rexml
/ streamlistener (33) -
rubygems
/ config _ file (22) -
rubygems
/ defaults (11) - shell (24)
-
shell
/ command-processor (30) -
shell
/ filter (12) -
shell
/ system-command (54) - syslog (22)
- timeout (19)
- win32ole (11)
クラス
- Dir (66)
-
Gem
:: ConfigFile (22) - Matrix (11)
-
RDoc
:: Options (11) -
REXML
:: DocType (33) -
REXML
:: NotationDecl (22) - Shell (24)
-
Shell
:: CommandProcessor (30) -
Shell
:: Filter (12) -
Shell
:: SystemCommand (54) - WIN32OLE (11)
モジュール
- Benchmark (33)
- FileUtils (11)
- Gem (11)
- Kernel (88)
- PTY (44)
-
REXML
:: SAX2Listener (22) -
REXML
:: StreamListener (33) - Readline (11)
- Syslog (22)
- Timeout (19)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
LOCALE
_ SYSTEM _ DEFAULT (11) -
OPERATING
_ SYSTEM _ DEFAULTS (11) -
SYSTEM
_ WIDE _ CONFIG _ FILE (11) - ` (11)
- active? (6)
-
alias
_ command (6) - benchmark (11)
- bm (11)
- bmbm (11)
- cat (6)
- command (6)
-
def
_ system _ command (6) -
default
_ system _ source _ cache _ dir (11) - doctype (22)
- echo (6)
- eigensystem (11)
- entitydecl (11)
- entries (11)
- exec (22)
-
external
_ id (11) - foreach (22)
- getpty (22)
- glob (6)
-
install
_ system _ commands (12) - kill (6)
- name (6)
- new (22)
- notationdecl (22)
- notify (12)
-
op
_ dir (11) - open (22)
- open! (11)
- out (6)
- public (11)
- rdoc (11)
- readline (11)
- reopen (11)
-
ruby 1
. 8 . 4 feature (11) - spawn (44)
-
start
_ import (6) - tee (6)
- terminate (6)
- timeout (19)
-
unalias
_ command (6) - uptodate? (11)
- wait? (6)
- xsystem (11)
検索結果
先頭5件
-
REXML
:: NotationDecl # system -> String | nil (24401.0) -
システム識別子(URI)を返します。
...システム識別子(URI)を返します。
宣言がシステム識別子を含まない場合は nil を返します。... -
Shell
:: Filter # system(command , *opts) -> Shell :: SystemCommand (21525.0) -
command を実行する.
...nd を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.d......ef_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Gem
:: ConfigFile :: SYSTEM _ WIDE _ CONFIG _ FILE -> String (21501.0) -
システム全体の設定ファイルのパスです。
システム全体の設定ファイルのパスです。 -
REXML
:: DocType # system -> String | nil (21431.0) -
DTD のシステム識別子を返します。
...DTD のシステム識別子を返します。
DTD が外部サブセットを含んでいない場合は nil を返します。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3......tml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype.public # => "-//W3C//DTD XHTML 1.0 Strict//EN"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root SYSTEM "foobar">
EOS
doctype.system # => "foobar"
doctype.public # => nil
//}... -
Readline
. # readline(prompt = "" , add _ hist = false) -> String | nil (18564.0) -
prompt を出力し、ユーザからのキー入力を待ちます。 エンターキーの押下などでユーザが文字列を入力し終えると、 入力した文字列を返します。 このとき、add_hist が true であれば、入力した文字列を入力履歴に追加します。 何も入力していない状態で EOF(UNIX では ^D) を入力するなどで、 ユーザからの入力がない場合は nil を返します。
...列を返します。
このとき、add_hist が true であれば、入力した文字列を入力履歴に追加します。
何も入力していない状態で EOF(UNIX では ^D) を入力するなどで、
ユーザからの入力がない場合は nil を返します。
本メソッドは......DF である。) 場合に発生します。
例:
require "readline"
input = Readline.readline
(プロンプトなどは表示せずに、入力待ちの状態になります。
ここでは「abc」を入力後、エンターキーを押したと想定します。)
abc
p input # =>......す。
例: ^CによるInterrupt例外を捕捉して、端末状態を復帰する。
require 'readline'
stty_save = `stty -g`.chomp
begin
while buf = Readline.readline
p buf
end
rescue Interrupt
system("stty", stty_save)
exit
end
例: INTシグナルを捕捉... -
Kernel
. # system(command , options={}) -> bool | nil (18560.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
options で :exception に true を指定することで、
nil や false を返す代わりに例外を発生するようにできます。
終了ステータスは変......解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指定......します。
@raise RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
//emlist[exceptionオプショ... -
Kernel
. # system(env , command , options={}) -> bool | nil (18560.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
options で :exception に true を指定することで、
nil や false を返す代わりに例外を発生するようにできます。
終了ステータスは変......解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指定......します。
@raise RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
//emlist[exceptionオプショ... -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (18535.0) -
system_path上にある全ての実行可能ファイルをShellに定義する. メソッ ド名は元のファイル名の頭にpreをつけたものとなる.
...
system_path上にある全ての実行可能ファイルをShellに定義する. メソッ
ド名は元のファイル名の頭にpreをつけたものとなる.
@param pre Shellに定義するメソッド名の先頭に付加される文字列を指定します。
使用例: ls -l | head -n 5......のような例。
require 'shell'
Shell.install_system_commands
sh = Shell.new
sh.verbose = false
sh.transact {
(sys_ls("-l") | sys_head("-n 5")).each {|l|
puts l
}
}... -
Kernel
. # system(command , options={}) -> bool | nil (18518.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...true を返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
終了ステータスは変数 $? で参照できます。
コマンドを実行することができなかった場合、多......解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指定......します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , command , options={}) -> bool | nil (18518.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...true を返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
終了ステータスは変数 $? で参照できます。
コマンドを実行することができなかった場合、多......解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指定......します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Gem
:: ConfigFile :: OPERATING _ SYSTEM _ DEFAULTS -> {} (18507.0) -
Ruby をパッケージングしている人がデフォルトの設定値をセットするために使用します。
...Ruby をパッケージングしている人がデフォルトの設定値をセットするために使用します。
使用するファイルは rubygems/defaults/operating_system.rb です。... -
Gem
. default _ system _ source _ cache _ dir -> String (18501.0) -
デフォルトのシステム全体のソースキャッシュファイルのパスを返します。
デフォルトのシステム全体のソースキャッシュファイルのパスを返します。