別のキーワード
ライブラリ
- ビルトイン (3)
- benchmark (2)
- matrix (1)
- mkmf (1)
-
net
/ ftp (1) -
rexml
/ document (6) -
rexml
/ sax2listener (2) -
rexml
/ streamlistener (2) -
rubygems
/ source _ info _ cache (2) - shell (4)
-
shell
/ command-processor (2) -
shell
/ filter (2) -
shell
/ system-command (15)
クラス
-
Benchmark
:: Tms (2) -
Gem
:: SourceInfoCache (2) - Matrix (1)
-
Net
:: FTP (1) -
REXML
:: DocType (3) -
REXML
:: Entity (1) -
REXML
:: NotationDecl (2) - Shell (4)
-
Shell
:: CommandProcessor (2) -
Shell
:: Filter (2) -
Shell
:: SystemCommand (15) - SystemCallError (1)
- SystemExit (2)
モジュール
- Kernel (1)
-
REXML
:: SAX2Listener (2) -
REXML
:: StreamListener (2)
キーワード
- active? (1)
- command (1)
- doctype (2)
- each (1)
- eigensystem (1)
- entitydecl (1)
- errno (1)
- external (1)
-
external
_ id (1) -
find
_ system _ command (3) - flush (1)
- format (1)
- input= (1)
- kill (1)
-
latest
_ system _ cache _ file (1) - name (1)
- notationdecl (1)
- notify (2)
- public (1)
- start (1)
-
start
_ export (1) -
start
_ import (1) - status (1)
- success? (1)
-
super
_ each (1) - system= (1)
-
system
_ cache _ file (1) -
system
_ path (1) -
system
_ path= (1) - terminate (1)
-
to
_ a (1) - wait? (1)
- xsystem (1)
検索結果
先頭5件
-
Shell
# system(command , *opts) -> Shell :: SystemCommand (73261.0) -
command を実行する.
command を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (73261.0) -
command を実行する.
command を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT -
Shell
:: Filter # system(command , *opts) -> Shell :: SystemCommand (73261.0) -
command を実行する.
command を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT -
REXML
:: DocType # system -> String | nil (72661.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.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w... -
Net
:: FTP # system -> String (72607.0) -
サーバーの OS のタイプを返します。
サーバーの OS のタイプを返します。
@raise Net::FTPTempError 応答コードが 4yz のときに発生します。
@raise Net::FTPPermError 応答コードが 5yz のときに発生します。
@raise Net::FTPProtoError 応答コードが RFC 的に正しくない場合に発生します。
@raise Net::FTPReplyError 応答コードが上の場合以外でエラーである場合に発生します。 -
REXML
:: NotationDecl # system -> String | nil (72607.0) -
システム識別子(URI)を返します。
システム識別子(URI)を返します。
宣言がシステム識別子を含まない場合は nil を返します。 -
Kernel
# xsystem(command , opts = nil) -> () (36670.0) -
Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー 出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー
出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
@param command コマンドを指定します。
@param opts オプションを Hash で指定します。
:werror というキーに真を指定すると
@see Kernel.#system -
Shell
# system _ path -> Array (36646.0) -
コマンドサーチパスの配列を返す。
コマンドサーチパスの配列を返す。
@param path コマンドサーチパスの配列を指定します。
使用例
require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"] -
Shell
# system _ path=(path) (36646.0) -
コマンドサーチパスの配列を返す。
コマンドサーチパスの配列を返す。
@param path コマンドサーチパスの配列を指定します。
使用例
require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"] -
Gem
:: SourceInfoCache # latest _ system _ cache _ file -> String (36607.0) -
最新のシステムキャッシュのファイル名を返します。
最新のシステムキャッシュのファイル名を返します。 -
Gem
:: SourceInfoCache # system _ cache _ file -> String (36607.0) -
システムキャッシュファイルの名前を返します。
システムキャッシュファイルの名前を返します。 -
REXML
:: NotationDecl # system=(value) (36607.0) -
システム識別子を変更します。
システム識別子を変更します。
@param value 設定するシステム識別子 -
Shell
# find _ system _ command(command) (36607.0) -
@todo
@todo -
Shell
:: CommandProcessor # find _ system _ command(command) (36607.0) -
@todo
@todo -
Shell
:: Filter # find _ system _ command(command) (36607.0) -
@todo
@todo -
Shell
:: SystemCommand # notify(*opts) -> String (27304.0) -
@todo
@todo
@param opts
@see Shell#notify -
Shell
:: SystemCommand # notify(*opts) {|message| . . . } -> String (27304.0) -
@todo
@todo
@param opts
@see Shell#notify -
Matrix
# eigensystem -> Matrix :: EigenvalueDecomposition (18604.0) -
行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。
行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。
Matrix::EigenvalueDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(右固有ベクトル、固有値行列、左固有ベクトル)
を得ることができます。
これを [V, D, W] と書くと、
(元の行列が対角化可能ならば)、
D は対角行列で、 self == V*D*W, V = W.inverse を満たします。
D のそれぞれの対角成分が行列の固有値です。
//emlist[例][ruby]{
require 'matrix'
m = Matrix[[1, 2], [... -
REXML
:: StreamListener # entitydecl(content) -> () (18376.0) -
DTDの実体宣言をパースしたときに呼び出されるコールバックメソッドです。
DTDの実体宣言をパースしたときに呼び出されるコールバックメソッドです。
@param content 実体宣言が配列で渡されます
実体宣言の書き方によって content に渡されるデータの形式が異なります。
//emlist[][ruby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
xml = <<EOS
<!DOCTYPE root [
<!ENTITY % YN '"Yes"'>
<!ENTITY % YN 'Yes... -
REXML
:: SAX2Listener # doctype(name , pub _ sys , long _ name , uri) -> () (18358.0) -
文書型宣言(DTD)に出会った時に呼び出されるコールバックメソッドです。
文書型宣言(DTD)に出会った時に呼び出されるコールバックメソッドです。
@param name 宣言されているルート要素名が文字列で渡されます。
@param pub_sys "PUBLIC" もしくは "SYSTEM" が渡されます。nilが渡される場合もあります。
@param long_name "SYSTEM" の場合はシステム識別子が、"PUBLIC"の場合は公開識別子が
文字列で渡されます
@param uri "SYSTEM" の場合は nil が、"PUBLIC" の場合はシステム識別子が渡されます -
REXML
:: StreamListener # doctype(name , pub _ sys , long _ name , uri) -> () (18358.0) -
文書型宣言(DTD)をパースしたときに呼び出されるコールバックメソッドです。
文書型宣言(DTD)をパースしたときに呼び出されるコールバックメソッドです。
pub_sys, long_name, uri はDTDが内部サブセットのみを
利用している場合には nil が渡されます。
@param name 宣言されているルート要素名が文字列で渡されます。
@param pub_sys "PUBLIC" もしくは "SYSTEM" が渡されます。nilが渡される場合もあります。
@param long_name "SYSTEM" の場合はシステム識別子が、"PUBLIC"の場合は公開識別子が
文字列で渡されます
@param uri "SYSTEM" の場... -
Shell
:: SystemCommand # active? -> bool (18004.0) -
@todo
@todo -
Shell
:: SystemCommand # command -> String (18004.0) -
@todo
@todo
コマンド名を返します。 -
Shell
:: SystemCommand # each(rs = nil) {|line| . . . } (18004.0) -
@todo
@todo
@param rs -
Shell
:: SystemCommand # flush -> () (18004.0) -
@todo
@todo -
Shell
:: SystemCommand # input=(inp) (18004.0) -
@todo
@todo -
Shell
:: SystemCommand # kill(signal) -> Integer (18004.0) -
自身のプロセスにシグナルを送ります。
自身のプロセスにシグナルを送ります。
@param signal シグナルを整数かその名前の文字列で指定します。
負の値を持つシグナル(あるいはシグナル名の前に-)を指定すると、
プロセスではなくプロセスグループにシグナルを送ります。
@see Process.#kill -
Shell
:: SystemCommand # name -> String (18004.0) -
@todo
@todo
コマンド名を返します。 -
Shell
:: SystemCommand # start -> () (18004.0) -
@todo
@todo -
Shell
:: SystemCommand # start _ export (18004.0) -
@todo
@todo -
Shell
:: SystemCommand # start _ import -> () (18004.0) -
@todo
@todo -
Shell
:: SystemCommand # super _ each -> () (18004.0) -
@todo
@todo
Shell::Filter#each です。 -
Shell
:: SystemCommand # terminate -> () (18004.0) -
@todo
@todo -
Shell
:: SystemCommand # wait? -> bool (18004.0) -
@todo
@todo -
SystemCallError
# errno -> Integer | nil (18004.0) -
レシーバに対応するシステム依存のエラーコードを返します。
レシーバに対応するシステム依存のエラーコードを返します。
エラーコードを渡さない形式で生成した場合は nil を返します。
begin
raise Errno::ENOENT
rescue Errno::ENOENT => err
p err.errno # => 2
p Errno::ENOENT::Errno # => 2
end
begin
raise SystemCallError, 'message'
rescue SystemCallError => err
p err.e... -
SystemExit
# status -> Integer (18004.0) -
例外オブジェクトに保存された終了ステータスを返します。
例外オブジェクトに保存された終了ステータスを返します。
終了ステータスは Kernel.#exit や SystemExit.new などで設定されます。
例:
begin
exit 1
rescue SystemExit => err
p err.status # => 1
end
begin
raise SystemExit.new(1, "dummy exit")
rescue SystemExit => err
p err.status # => 1
end -
SystemExit
# success? -> bool (18004.0) -
終了ステータスが正常終了を示す値ならば true を返します。
終了ステータスが正常終了を示す値ならば true を返します。
大半のシステムでは、ステータス 0 が正常終了を表します。
例:
begin
exit true
rescue SystemExit => err
p err.success? # => true
end
begin
exit false
rescue SystemExit => err
p err.success? # => false
end -
REXML
:: DocType # public -> String | nil (9058.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.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http:/... -
REXML
:: DocType # external _ id -> String | nil (9052.0) -
DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。
DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の
いずれかの文字列を返します。
それ以外の場合は 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.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.... -
REXML
:: Entity # external -> String | nil (9052.0) -
実体が外部実体(external entity)宣言である場合は "SYSTEM" もしくは "PUBLIC" という文字列を返します。
実体が外部実体(external entity)宣言である場合は
"SYSTEM" もしくは "PUBLIC" という文字列を返します。
内部実体(internal entity)宣言である場合には nil を返します。 -
REXML
:: SAX2Listener # notationdecl(name , public _ or _ system , public _ id , system _ id) -> () (1264.0) -
DTDの記法宣言に出会ったときに呼び出されるコールバックメソッドです。
DTDの記法宣言に出会ったときに呼び出されるコールバックメソッドです。
@param name 記法名が文字列で渡されます
@param public_or_system "PUBLIC" もしくは "SYSTEM" が渡されます
@param public_id 公開識別子が文字列で渡されます。指定されていない場合はnilが渡されます
@param system_id システム識別子が文字列で渡されます。指定されていない場合はnilが渡されます -
Benchmark
:: Tms # to _ a -> Array (340.0) -
6 要素の配列を返します。
6 要素の配列を返します。
要素は以下の順番で配列に格納されています。
* ラベル
* user CPU time
* system CPU time,
* 子プロセスの user CPU time
* 子プロセスの system CPU time,
* 実経過時間 -
Benchmark
:: Tms # format(fmtstr = nil , *args) -> String (112.0) -
self を指定されたフォーマットで整形して返します。
self を指定されたフォーマットで整形して返します。
このメソッドは Kernel.#format のようにオブジェクトを整形しますが、
以下の拡張を使用することができます。
: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの s...