ライブラリ
- ビルトイン (179)
キーワード
- == (12)
- arity (12)
- bind (12)
-
bind
_ call (12) - clone (12)
- eql? (12)
- hash (12)
- inspect (12)
- name (12)
-
original
_ name (12) - owner (12)
- parameters (12)
-
source
_ location (12) -
super
_ method (11) -
to
_ s (12)
検索結果
先頭5件
-
UnboundMethod
# name -> Symbol (1.0) -
このメソッドの名前を返します。
このメソッドの名前を返します。
//emlist[例][ruby]{
a = String.instance_method(:size)
a.name # => :size
//} -
UnboundMethod
# original _ name -> Symbol (1.0) -
オリジナルのメソッド名を返します。
オリジナルのメソッド名を返します。
//emlist[例][ruby]{
class C
def foo; end
alias bar foo
end
C.instance_method(:bar).original_name # => :foo
//}
@see Method#original_name -
UnboundMethod
# owner -> Class | Module (1.0) -
このメソッドが定義されている class か module を返します。
このメソッドが定義されている class か module を返します。
//emlist[例][ruby]{
Integer.instance_method(:to_s).owner # => Integer
Integer.instance_method(:to_c).owner # => Numeric
Integer.instance_method(:hash).owner # => Kernel
//} -
UnboundMethod
# parameters -> [object] (1.0) -
UnboundMethod オブジェクトの引数の情報を返します。
...
UnboundMethod オブジェクトの引数の情報を返します。
詳しくは Method#parameters を参照してください。
@see Proc#parameters, Method#parameters... -
UnboundMethod
# source _ location -> [String , Integer] | nil (1.0) -
ソースコードのファイル名と行番号を配列で返します。
ソースコードのファイル名と行番号を配列で返します。
その手続オブジェクトが ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。
//emlist[例][ruby]{
require 'time'
Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2.4.0/time.rb", 654]
/... -
UnboundMethod
# super _ method -> UnboundMethod | nil (1.0) -
self 内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ クトにして返します。
...self 内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ
クトにして返します。
@see Method#super_method... -
UnboundMethod
# to _ s -> String (1.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect...