Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
How can I know which method is called?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Sam Kong, post: 4514183"] Hello! When you send a message to an object, Ruby follows some path along singleton object, class, included modules, superclasses, and so on. Is there a way to know where the responding method is defined? For example: obj = MyClass.new .... obj.f The method f could be defined in MyClass or it could be just obj's singleton method or whatever. Is there a way to be sure of it? I think I can find which class or module newly define a method. But I don't know whether a method is redefined by a class or module. Thanks. Sam [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
How can I know which method is called?
Top