H
Hal E. Fulton
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
#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