Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
メソッドが定義されているクラスを知ることができるかどうか知っていますか?
例えば、
to_a は、おそらく Enumerable および Numeric または他の場所で定義されています。クラスオブジェクトのような関数はありますか:
=> aaa=[1,2,3,4,5] => aaa.class => Array
「defined_in」のようなメソッドはありますか? メソッドが定義されているクラスを知るには?
=> to_a.defined_in?