129件ヒット
[101-129件を表示]
(0.061秒)
別のキーワード
ライブラリ
- ビルトイン (129)
キーワード
- << (7)
- === (8)
- >> (7)
- [] (12)
- call (24)
- inspect (12)
-
original
_ name (12) - parameters (12)
-
source
_ location (12) -
super
_ method (11) -
to
_ s (12)
検索結果
先頭3件
-
Method
# super _ method -> Method | nil (32.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 m......ethod"
m.super_method # => #<Method: Super#foo>
m.super_method.call # => "superclass method"
//}... -
Method
# original _ name -> Symbol (26.0) -
オリジナルのメソッド名を返します。
...オリジナルのメソッド名を返します。
//emlist[例][ruby]{
class C
def foo; end
alias bar foo
end
C.new.method(:bar).original_name # => :foo
//}
@see UnboundMethod#original_name... -
Method
# parameters -> [object] (26.0) -
Method オブジェクトの引数の情報を返します。
...Method オブジェクトの引数の情報を返します。
Method オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に応じた以下のような Symbol と、仮引数の名......//emlist[例][ruby]{
m = Class.new{define_method(:m){|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}}.instance_method(:m)
m.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
File.method(:symlink).parameters #=> req
//}
@see Proc#param...