るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.094秒)

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. irb/input-method encoding

ライブラリ

クラス

検索結果

Method#inspect -> String (55057.0)

self を読みやすい文字列として返します。

self を読みやすい文字列として返します。

以下の形式の文字列を返します。

#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)

klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。

klass2 は、実際にそのメソッドを定義しているクラス/モジュール名、
method は、メソッド名を表します。

arg は引数を表します。
「foo.rb:2」は Method#...

Method#to_s -> String (9757.0)

self を読みやすい文字列として返します。

self を読みやすい文字列として返します。

以下の形式の文字列を返します。

#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)

klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。

klass2 は、実際にそのメソッドを定義しているクラス/モジュール名、
method は、メソッド名を表します。

arg は引数を表します。
「foo.rb:2」は Method#...