4件ヒット
[1-4件を表示]
(0.105秒)
種類
- インスタンスメソッド (2)
- クラス (1)
- モジュール関数 (1)
ライブラリ
- benchmark (1)
-
rexml
/ document (1) -
shell
/ filter (2)
クラス
-
Shell
:: Filter (2)
モジュール
- Benchmark (1)
キーワード
- NotationDecl (1)
- measure (1)
- | (1)
検索結果
先頭4件
-
Shell
:: Filter # to _ s -> String (63358.0) -
実行結果を文字列で返します。
実行結果を文字列で返します。
require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
puts (cat("/etc/passwd") | wc("-l")).to_s
} -
REXML
:: NotationDecl (18145.0) -
DTD の記法宣言を表すクラスです。
DTD の記法宣言を表すクラスです。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!NOTATION type-image-svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!NOTATION type-image-gif PUBLIC "image/gif">... -
Shell
:: Filter # |(filter) -> object (9409.0) -
パイプ結合を filter に対して行います。
パイプ結合を filter に対して行います。
@param filter Shell::Filter オブジェクトを指定します。
@return filter を返します。
使用例
require 'shell'
Shell.def_system_command("tail")
Shell.def_system_command("head")
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
i = 1
while i <= (cat("/etc/passwd") | wc(... -
Benchmark
. # measure(label = "") { . . . } -> Benchmark :: Tms (337.0) -
与えられたブロックを実行して、経過した時間を Process.#times で計り、 Benchmark::Tms オブジェクトを生成して返します。
与えられたブロックを実行して、経過した時間を Process.#times で計り、
Benchmark::Tms オブジェクトを生成して返します。
Benchmark::Tms オブジェクトには to_s が定義されているので、
基本的には以下のように使います。
//emlist[][ruby]{
require 'benchmark'
puts Benchmark::CAPTION
puts Benchmark.measure { "a"*1_000_000 }
#=>
#
# user system total real
# 1.1666...