11件ヒット
[1-11件を表示]
(0.107秒)
ライブラリ
- ビルトイン (2)
- erb (2)
-
fiddle
/ import (1) - resolv-replace (1)
-
rubygems
/ specification (1) - socket (3)
- tracer (1)
クラス
- ERB (2)
-
Gem
:: Specification (1) - Module (1)
- Tracer (1)
- UDPSocket (4)
- UnboundMethod (1)
モジュール
-
Fiddle
:: Importer (1)
キーワード
-
add
_ bindir (1) - connect (1)
-
instance
_ method (1) -
recvfrom
_ nonblock (1) - result (1)
- run (1)
-
trace
_ func (1)
検索結果
先頭5件
-
UnboundMethod
# bind(obj) -> Method (72415.0) -
self を obj にバインドした Method オブジェクトを生成して返します。
self を obj にバインドした Method オブジェクトを生成して返します。
@param obj 自身をバインドしたいオブジェクトを指定します。ただしバインドできるのは、
生成元のクラスかそのサブクラスのインスタンスのみです。
@raise TypeError objがbindできないオブジェクトである場合に発生します
//emlist[例][ruby]{
# クラスのインスタンスメソッドの UnboundMethod の場合
class Foo
def foo
"foo"
end
end
# UnboundMethod `m' を生... -
UDPSocket
# bind(host , port) -> 0 (63445.0) -
ソケットを host の port に bind(2) します。
ソケットを host の port に bind(2) します。
bind したポートから Socket#recv でデータを受け取ることができます。
@param host bind するホスト名文字列
@param port bind するポート番号 -
UDPSocket
# bind(host , port) -> Integer (63445.0) -
UDPSocket#bindのパラメータ host の名前解決に resolv ライブラリを使います。
UDPSocket#bindのパラメータ host の名前解決に resolv
ライブラリを使います。
@param host bindするホスト名を文字列で指定します。
@param port bindするポートを指定します。
@raise SocketError 名前解決に失敗した場合に発生します。 -
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (54679.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
Ruby のブロックを C の関数で wrap し、その関数をモジュールに
インポートします。
これでインポートされた関数はモジュール関数として定義されます。
また、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出すことができます。
signature で関数の名前とシネグチャを指定します。例えば
"int compare(void*, void*)" のように指定します。
opts には :stdcall もしくは :cdecl を渡すことができ、
呼出規約を明示することができます。
@return インポートした関数を表す ... -
Tracer
# trace _ func(event , file , line , id , binding , klass , *) -> object | nil (18652.0) -
@todo
@todo -
ERB
# result(b=TOPLEVEL _ BINDING) -> String (18622.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 (18622.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
//} -
Gem
:: Specification # add _ bindir(executables) -> Array | nil (18622.0) -
実行コマンドの格納場所を返します。
実行コマンドの格納場所を返します。
@param executables 実行コマンド名を格納した配列を指定します。 -
Module
# instance _ method(name) -> UnboundMethod (9676.0) -
self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
@param name メソッド名を Symbol または String で指定します。
@raise NameError self に存在しないメソッドを指定した場合に発生します。
@see Module#public_instance_method, Object#method
//emlist[例][ruby]{
class Interpreter
def do_a() print "there, "; end
def do_d() print "Hello ";... -
UDPSocket
# connect(host , port) -> 0 (9166.0) -
ソケットを host の port に connect(2) します。
ソケットを host の port に connect(2) します。
これによって UDPSocket#send で送り先のアドレスを指定せずに
データを送ることができます(connect しなくとも送り先のアドレスを明示すれば
データを送ることができます)。
require 'socket'
u1 = UDPSocket.new
u1.bind("127.0.0.1", 4913)
u2 = UDPSocket.new
u2.connect("127.0.0.1", 4913)
u2.send "uuuu", 0
p u1.recvfrom(10) #=... -
UDPSocket
# recvfrom _ nonblock(maxlen , flags=0) -> [String , Array] (9094.0) -
ソケットをノンブロッキングモードに設定した後、 recvfrom(2) でソケットからデータを受け取ります。
ソケットをノンブロッキングモードに設定した後、
recvfrom(2) でソケットからデータを受け取ります。
maxlen で受け取るデータの最大バイト数を指定します。
flags はフラグで、Socket::MSG_* の bitwise OR を渡します。
詳しくは recvfrom(2) を参照してください。
返り値はデータの文字列と送り元のアドレス情報の
2要素の配列となります。
recvfrom(2) がエラーになった場合、
Errno::EAGAIN, Errno::EINTR を含め例外 Errno::EXXX が発生します。
Errno::EWOULDBLOCK、Err...