60件ヒット
[1-60件を表示]
(0.089秒)
ライブラリ
- erb (24)
-
fiddle
/ import (12) -
irb
/ frame (24)
クラス
- ERB (24)
-
IRB
:: Frame (24)
モジュール
-
Fiddle
:: Importer (12)
検索結果
先頭5件
-
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (18120.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
...typealias "size_t", "unsigned long"
extern "int qsort(void*, size_t, size_t, void*)"
bind("int compare(void*, void*)"){|px, py|
x = px.to_s(Fiddle::SIZEOF_INT).unpack("i!")
y = py.to_s(Fiddle::SIZEOF_INT).unpack("i!")
x <=> y
}
end
data = [32, 180001, -1... -
IRB
:: Frame # bottom(n = 0) -> Binding (6201.0) -
下から n 番目のコンテキストを取り出します。
下から n 番目のコンテキストを取り出します。
@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
下位になります。 -
IRB
:: Frame # top(n = 0) -> Binding (6201.0) -
上から n 番目のコンテキストを取り出します。
上から n 番目のコンテキストを取り出します。
@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
上位になります。 -
ERB
# result(b=TOPLEVEL _ BINDING) -> String (201.0) -
ERB を b の binding で実行し、結果の文字列を返します。
...ERB を b の binding で実行し、結果の文字列を返します。
@param b eRubyスクリプトが実行されるときのbinding
//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test1 = "foo"
test2 = "bar"
puts erb.result
# test foo
# test bar
//... -
ERB
# run(b=TOPLEVEL _ BINDING) -> nil (201.0) -
ERB を b の binding で実行し、結果を標準出力へ印字します。
...ERB を b の binding で実行し、結果を標準出力へ印字します。
@param b eRubyスクリプトが実行されるときのbinding
//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test1 = "foo"
test2 = "bar"
erb.run
# test foo
# test bar
//}...