Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Reflection API -- determining methods' origins

Reply
Thread Tools

Reflection API -- determining methods' origins

 
 
Hal E. Fulton
Guest
Posts: n/a
 
      08-08-2003
I've been thinking since yesterday about
#methods and #instance_methods and such.

I don't see any simple way of determining
whether a method is inherited or mixed in
or whatever. (Singleton methods can be
detected, I think.)

For example, suppose B inherits from A and
mixes in M.

I could do some array subtraction to take
away the methods from A and M... but that
ignores the possibility that they might be
rewritten in B.

What I'm trying for is a reliably way of
determining the methods that are *defined
in B* (regardless of whether they may be
hiding methods in a parent).

Am I overlooking something here?

Hal

--
Hal Fulton



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wages, camera origins and ultimate cost to consumers RichA Digital Photography 2 05-12-2011 02:13 AM
Origins of RFC1 Lawrence D'Oliveiro NZ Computing 0 04-09-2009 01:18 AM
Unable to post to talk.origins - but talk.atheism ok Rolf Computer Support 2 04-09-2006 09:48 AM
[OT] Map of email origins to Python list Claire McLister Python 23 11-09-2005 06:42 PM
[OT] Origins of a.out Nick Landsberg C Programming 6 02-23-2004 02:55 AM



Advertisments