22件ヒット
[1-22件を表示]
(0.012秒)
別のキーワード
検索結果
-
Method
# inspect -> String (18126.0) -
self を読みやすい文字列として返します。
...として返します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス......hod(:foo) # => #<Method: Bar(Foo)#foo>
p Bar.new.method(:bar) # => #<Method: Bar#bar>
//}
klass1 と klass2 が同じ場合は以下の形式になります。
#<Method: klass1#method> (形式2)
特異メソッドに対しては、
#<Method: obj.method>......(形式3)
#<Method: klass1(klass2).method> (形式4)
という形式の文字列を返します。二番目の形式では klass1 はレシーバ、
klass2 は実際にそのメソッドを定義しているオブジェクトになります。
//emlist[例][r......として返します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラ......# => #<Method: Bar(Foo)#foo() test.rb:2>
p Bar.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
//}
klass1 と klass2 が同じ場合は以下の形式になります。
#<Method: klass1#method() foo.rb:2> (形式2)
特異メソッドに対しては、
#<Method: o......bj.method() foo.rb:2> (形式3)
#<Method: klass1(klass2).method() foo.rb:2> (形式4)
という形式の文字列を返します。二番目の形式では klass1 はレシーバ、
klass2 は実際にそのメソッドを定義しているオブジェクトになります。
/... -
Method
# to _ s -> String (3026.0) -
self を読みやすい文字列として返します。
...として返します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス......hod(:foo) # => #<Method: Bar(Foo)#foo>
p Bar.new.method(:bar) # => #<Method: Bar#bar>
//}
klass1 と klass2 が同じ場合は以下の形式になります。
#<Method: klass1#method> (形式2)
特異メソッドに対しては、
#<Method: obj.method>......(形式3)
#<Method: klass1(klass2).method> (形式4)
という形式の文字列を返します。二番目の形式では klass1 はレシーバ、
klass2 は実際にそのメソッドを定義しているオブジェクトになります。
//emlist[例][r......として返します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラ......# => #<Method: Bar(Foo)#foo() test.rb:2>
p Bar.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
//}
klass1 と klass2 が同じ場合は以下の形式になります。
#<Method: klass1#method() foo.rb:2> (形式2)
特異メソッドに対しては、
#<Method: o......bj.method() foo.rb:2> (形式3)
#<Method: klass1(klass2).method() foo.rb:2> (形式4)
という形式の文字列を返します。二番目の形式では klass1 はレシーバ、
klass2 は実際にそのメソッドを定義しているオブジェクトになります。
/...