ライブラリ
- ビルトイン (1)
- benchmark (1)
-
net
/ ftp (1) -
rexml
/ document (5) -
rubygems
/ source _ info _ cache (2) - shell (1)
-
shell
/ command-processor (1) -
shell
/ filter (3) -
shell
/ system-command (4)
クラス
-
Benchmark
:: Tms (1) -
Gem
:: SourceInfoCache (2) -
Net
:: FTP (1) -
RDoc
:: Options (1) -
REXML
:: DocType (3) -
REXML
:: Entity (1) -
REXML
:: NotationDecl (1) - Shell (1)
-
Shell
:: CommandProcessor (1) -
Shell
:: Filter (3) -
Shell
:: SystemCommand (4) - String (1)
キーワード
- command (1)
- echo (3)
- external (1)
-
external
_ id (1) - format (1)
-
latest
_ system _ cache _ file (1) - name (1)
- notify (2)
-
op
_ dir (1) - public (1)
- sum (1)
-
system
_ cache _ file (1) -
to
_ a (1) -
to
_ s (1)
検索結果
先頭5件
-
REXML
:: DocType # system -> String | nil (54664.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 (54610.0) -
サーバーの OS のタイプを返します。
サーバーの OS のタイプを返します。
@raise Net::FTPTempError 応答コードが 4yz のときに発生します。
@raise Net::FTPPermError 応答コードが 5yz のときに発生します。
@raise Net::FTPProtoError 応答コードが RFC 的に正しくない場合に発生します。
@raise Net::FTPReplyError 応答コードが上の場合以外でエラーである場合に発生します。 -
REXML
:: NotationDecl # system -> String | nil (54610.0) -
システム識別子(URI)を返します。
システム識別子(URI)を返します。
宣言がシステム識別子を含まない場合は nil を返します。 -
String
# sum(bits = 16) -> Integer (27022.0) -
文字列の bits ビットのチェックサムを計算します。
文字列の bits ビットのチェックサムを計算します。
以下と同じです。
//emlist[][ruby]{
def sum(bits)
sum = 0
each_byte {|c| sum += c }
return 0 if sum == 0
sum & ((1 << bits) - 1)
end
//}
例えば以下のコードで UNIX System V の
sum(1) コマンドと同じ値が得られます。
//emlist[例][ruby]{
sum = 0
ARGF.each_line do |line|
sum += line.sum
end
sum %= ... -
Gem
:: SourceInfoCache # latest _ system _ cache _ file -> String (18610.0) -
最新のシステムキャッシュのファイル名を返します。
最新のシステムキャッシュのファイル名を返します。 -
Gem
:: SourceInfoCache # system _ cache _ file -> String (18610.0) -
システムキャッシュファイルの名前を返します。
システムキャッシュファイルの名前を返します。 -
Shell
:: SystemCommand # command -> String (9310.0) -
@todo
@todo
コマンド名を返します。 -
Shell
:: SystemCommand # name -> String (9310.0) -
@todo
@todo
コマンド名を返します。 -
Shell
:: SystemCommand # notify(*opts) -> String (9310.0) -
@todo
@todo
@param opts
@see Shell#notify -
Shell
:: SystemCommand # notify(*opts) {|message| . . . } -> String (9310.0) -
@todo
@todo
@param opts
@see Shell#notify -
REXML
:: DocType # public -> String | nil (361.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 (355.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 (355.0) -
実体が外部実体(external entity)宣言である場合は "SYSTEM" もしくは "PUBLIC" という文字列を返します。
実体が外部実体(external entity)宣言である場合は
"SYSTEM" もしくは "PUBLIC" という文字列を返します。
内部実体(internal entity)宣言である場合には nil を返します。 -
Benchmark
:: Tms # format(fmtstr = nil , *args) -> String (343.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... -
RDoc
:: Options # op _ dir -> String (325.0) -
コマンドライン引数の --op オプションで指定したディレクトリを返します。
コマンドライン引数の --op オプションで指定したディレクトリを返します。
--ri、--ri-site、--ri-system オプションにも影響される事に注意してください。
@return 設定されたディレクトリを文字列で返します。 -
Shell
:: Filter # to _ a -> [String] (325.0) -
実行結果を文字列の配列で返します。
実行結果を文字列の配列で返します。
require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
puts sh.cat("/etc/passwd").to_a -
Shell
:: Filter # to _ s -> String (325.0) -
実行結果を文字列で返します。
実行結果を文字列で返します。
require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
puts (cat("/etc/passwd") | wc("-l")).to_s
} -
Shell
# echo(*strings) -> Shell :: Filter (322.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param strings シェルコマンド echo に与える引数を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al... -
Shell
:: CommandProcessor # echo(*strings) -> Shell :: Filter (322.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param strings シェルコマンド echo に与える引数を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al... -
Shell
:: Filter # echo(*strings) -> Shell :: Filter (322.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param strings シェルコマンド echo に与える引数を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...