クラス
-
Fiddle
:: Function (1) - Method (1)
- Object (1)
-
OpenSSL
:: SSL :: SSLContext (2) -
Thread
:: Backtrace :: Location (4)
モジュール
- Enumerable (4)
キーワード
-
absolute
_ path (1) -
base
_ label (1) - clone (1)
- detect (2)
- find (2)
- inspect (1)
-
singleton
_ method (1) -
tmp
_ dh _ callback (1) -
tmp
_ dh _ callback= (1) -
to
_ s (1)
検索結果
先頭5件
-
Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil (72607.0) -
関数を呼び出します。
関数を呼び出します。
Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。
引数の変換は以下の通りです。
: void* (つまり任意のポインタ型)
nil ならば C の NULL に変換されます
Fiddle::Pointer は保持している C ポインタに変換されます。
文字列であればその先頭ポインタになります。
IO オブジェクトであれば FILE* が渡されます。
整数であればそれがアドレスとみ... -
OpenSSL
:: SSL :: SSLContext # tmp _ dh _ callback -> Proc | nil (45604.0) -
一時的 DH 鍵を生成するためのコールバックを返します。
一時的 DH 鍵を生成するためのコールバックを返します。
@see OpenSSL::SSL::SSLContext#tmp_dh_callback= -
OpenSSL
:: SSL :: SSLContext # tmp _ dh _ callback=(cb) (45604.0) -
一時的 DH 鍵を生成するためのコールバックを設定します。
一時的 DH 鍵を生成するためのコールバックを設定します。
コールバックには Proc や Method を渡します。
暗号で一時的な DH 鍵を利用する場合にはこのコールバックが
呼びだされ、呼びだされたブロックは適切な鍵パラメータを返さなければ
なりません。これで設定するブロックは
proc{|sslsocket, is_export, keylen| ... }
という引数を取るようにします。それぞれの引数の意味は
* sslsocket 通信に使われる OpenSSL::SSL::SSLSocket オブジェクト
* is_export 輸出規制のある暗号を利用するかど... -
Object
# singleton _ method(name) -> Method (36622.0) -
オブジェクトの特異メソッド name をオブジェクト化した Method オブ ジェクトを返します。
オブジェクトの特異メソッド name をオブジェクト化した Method オブ
ジェクトを返します。
@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。
//emlist[][ruby]{
class Demo
def initialize(n)
@iv = n
end
def hello()
"Hello, @iv = #{@iv}"
end
end
k = Demo.new(99)
def k.hi
"Hi, @iv = ... -
Method
# clone -> Method (27640.0) -
自身を複製した Method オブジェクトを作成して返します。
自身を複製した Method オブジェクトを作成して返します。
//emlist[例][ruby]{
class Foo
def foo
"foo"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.call # => "foo"
m.clone # => #<Method: Foo#foo>
m.clone.call # => "foo"
//} -
Enumerable
# detect(ifnone = nil) -> Enumerator (18640.0) -
要素に対してブロックを評価した値が真になった最初の要素を返します。
要素に対してブロックを評価した値が真になった最初の要素を返します。
真になる要素が見つからず、ifnone も指定されていないときは nil を返します。
真になる要素が見つからず、ifnone が指定されているときは ifnone を call した結果を返します。
ブロックを省略した場合は Enumerator を返します。
@param ifnone call メソッドを持つオブジェクト (例えば Proc) を指定します。
//emlist[例][ruby]{
# 最初の 3 の倍数を探す
p [1, 2, 3, 4, 5].find {|i| i % 3 == 0 } ... -
Enumerable
# detect(ifnone = nil) {|item| . . . } -> object (18640.0) -
要素に対してブロックを評価した値が真になった最初の要素を返します。
要素に対してブロックを評価した値が真になった最初の要素を返します。
真になる要素が見つからず、ifnone も指定されていないときは nil を返します。
真になる要素が見つからず、ifnone が指定されているときは ifnone を call した結果を返します。
ブロックを省略した場合は Enumerator を返します。
@param ifnone call メソッドを持つオブジェクト (例えば Proc) を指定します。
//emlist[例][ruby]{
# 最初の 3 の倍数を探す
p [1, 2, 3, 4, 5].find {|i| i % 3 == 0 } ... -
Enumerable
# find(ifnone = nil) -> Enumerator (18640.0) -
要素に対してブロックを評価した値が真になった最初の要素を返します。
要素に対してブロックを評価した値が真になった最初の要素を返します。
真になる要素が見つからず、ifnone も指定されていないときは nil を返します。
真になる要素が見つからず、ifnone が指定されているときは ifnone を call した結果を返します。
ブロックを省略した場合は Enumerator を返します。
@param ifnone call メソッドを持つオブジェクト (例えば Proc) を指定します。
//emlist[例][ruby]{
# 最初の 3 の倍数を探す
p [1, 2, 3, 4, 5].find {|i| i % 3 == 0 } ... -
Enumerable
# find(ifnone = nil) {|item| . . . } -> object (18640.0) -
要素に対してブロックを評価した値が真になった最初の要素を返します。
要素に対してブロックを評価した値が真になった最初の要素を返します。
真になる要素が見つからず、ifnone も指定されていないときは nil を返します。
真になる要素が見つからず、ifnone が指定されているときは ifnone を call した結果を返します。
ブロックを省略した場合は Enumerator を返します。
@param ifnone call メソッドを持つオブジェクト (例えば Proc) を指定します。
//emlist[例][ruby]{
# 最初の 3 の倍数を探す
p [1, 2, 3, 4, 5].find {|i| i % 3 == 0 } ... -
Thread
:: Backtrace :: Location # absolute _ path -> String (18040.0) -
self が表すフレームの絶対パスを返します。
self が表すフレームの絶対パスを返します。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see... -
Thread
:: Backtrace :: Location # base _ label -> String (18040.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
self が表すフレームの基本ラベルを返します。通常、
Thread::Backtrace::Location#label から修飾を取り除いたもので構成
されます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.base_label
end
# => init... -
Thread
:: Backtrace :: Location # inspect -> String (18040.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.inspect
end
# => "path/to/foo.rb:5:in ... -
Thread
:: Backtrace :: Location # to _ s -> String (18040.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し
ます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to_s
end
# => path/to/foo.rb:5:in `initialize'
# path/to/foo...