ライブラリ
- ビルトイン (200)
-
minitest
/ unit (1) - openssl (72)
クラス
- BasicObject (24)
- Method (91)
- Module (12)
- Object (24)
-
OpenSSL
:: SSL :: SSLContext (60) -
OpenSSL
:: X509 :: Store (12) - TracePoint (31)
- UnboundMethod (18)
モジュール
キーワード
- << (7)
- === (8)
- >> (7)
- [] (12)
-
assert
_ respond _ to (1) - bind (6)
-
bind
_ call (12) -
callee
_ id (12) - curry (22)
-
instance
_ eval (24) -
instance
_ method (12) -
method
_ id (12) - parameters (7)
-
session
_ get _ cb= (12) -
session
_ new _ cb= (12) -
session
_ remove _ cb= (12) -
singleton
_ method (12) -
super
_ method (11) -
tmp
_ dh _ callback= (12) -
verify
_ callback= (24)
検索結果
先頭5件
-
Method
# call(*args) -> object (27245.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called......with arg 2"
//}... -
Method
# call(*args) { . . . } -> object (27245.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called......with arg 2"
//}... -
Method
# call(*args) -> object (27239.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...ん。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
/... -
Method
# call(*args) { . . . } -> object (27239.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...ん。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
/... -
Method
# call(*args) -> object (27233.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...ません。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}... -
Method
# call(*args) { . . . } -> object (27233.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...ません。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}... -
Method
# super _ method -> Method | nil (24497.0) -
self 内で super を実行した際に実行されるメソッドを Method オブジェ クトにして返します。
... Method オブジェ
クトにして返します。
@see UnboundMethod#super_method
//emlist[例][ruby]{
class Super
def foo
"superclass method"
end
end
class Sub < Super
def foo
"subclass method"
end
end
m = Sub.new.method(:foo) # => #<Method: Sub#foo>
m.call # => "subclass meth......od"
m.super_method # => #<Method: Super#foo>
m.super_method.call # => "superclass method"
//}... -
Object
# method(name) -> Method (24473.0) -
オブジェクトのメソッド name をオブジェクト化した Method オブジェクトを返します。
...した
Method オブジェクトを返します。
@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。
//emlist[][ruby]{
me = -365.method(:abs)
p me #=> #<Method: Integer#......abs>
p me.call #=> 365
//}
@see Module#instance_method, Method, BasicObject#__send__, Object#send, Kernel.#eval, Object#singleton_method... -
Object
# singleton _ method(name) -> Method (12409.0) -
オブジェクトの特異メソッド name をオブジェクト化した Method オブ ジェクトを返します。
...化した Method オブ
ジェクトを返します。
@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。
//emlist[][ruby]{
class Demo
def initialize(n)
@iv = n
e......o, @iv = #{@iv}"
end
end
k = Demo.new(99)
def k.hi
"Hi, @iv = #{@iv}"
end
m = k.singleton_method(:hi) # => #<Method: #<Demo:0xf8b0c3c4 @iv=99>.hi>
m.call #=> "Hi, @iv = 99"
m = k.singleton_method(:hello) # => NameError
//}
@see Module#instance_method, Method, BasicObject#__send__, Object#......send, Kernel.#eval, Object#method... -
Module
# instance _ method(name) -> UnboundMethod (12362.0) -
self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
...nboundMethod を返します。
@param name メソッド名を Symbol または String で指定します。
@raise NameError self に存在しないメソッドを指定した場合に発生します。
@see Module#public_instance_method, Object#method
//emlist[例][ruby]{
class Interpreter
d......int "there, "; end
def do_d() print "Hello "; end
def do_e() print "!\n"; end
def do_v() print "Dave"; end
Dispatcher = {
"a" => instance_method(:do_a),
"d" => instance_method(:do_d),
"e" => instance_method(:do_e),
"v" => instance_method(:do_v)
}
def interpret(str......ing)
string.each_char {|b| Dispatcher[b].bind(self).call }
end
end
interpreter = Interpreter.new
interpreter.interpret('dave')
# => Hello there, Dave!
//}... -
TracePoint
# method _ id -> Symbol | nil (12244.0) -
イベントが発生したメソッドの定義時の名前を Symbol で返します。 トップレベルであった場合は nil を返します。
...。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[][ruby]{
class C
def method_name
end
alias alias_name method_name
end
trace = TracePoint.new(:call) do |tp|
p [tp.method_id, tp.callee_id] # => [:method_name, :alias_name]
end
trace.e......nable do
C.new.alias_name
end
//}
@see TracePoint#callee_id... -
UnboundMethod
# bind _ call(recv , *args) -> object (12239.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call... -
UnboundMethod
# bind _ call(recv , *args) { . . . } -> object (12239.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call... -
OpenSSL
:: SSL :: SSLContext # tmp _ dh _ callback=(cb) (12219.0) -
一時的 DH 鍵を生成するためのコールバックを設定します。
...や Method を渡します。
暗号で一時的な DH 鍵を利用する場合にはこのコールバックが
呼びだされ、呼びだされたブロックは適切な鍵パラメータを返さなければ
なりません。これで設定するブロックは
proc{|sslsocket, is_export, k......eylen| ... }
という引数を取るようにします。それぞれの引数の意味は
* sslsocket 通信に使われる OpenSSL::SSL::SSLSocket オブジェクト
* is_export 輸出規制のある暗号を利用するかどうかを0か0以外かで指定
* keylen 鍵長
となります......れで返されるオブジェクトはパラメータしか
用いられません。
cb に nil を指定するとデフォルトのパラメータが利用されます。
デフォルト値は nil です。
@param cb 設定するコールバック
@see OpenSSL::SSL::SSLContext#tmp_dh_callback...