[MacRuby-devel] is_a? method
Charles Steinman
acharlieblue at gmail.com
Thu Feb 3 22:12:01 PST 2011
On Thu, Feb 3, 2011 at 5:28 PM, Eric Christopherson
<echristopherson at gmail.com> wrote:
> On Sat, Jan 29, 2011 at 5:15 PM, Robert Rice <rice.audio at pobox.com> wrote:
>> Hi Eric:
>>
>> Thanks, the ancestors method will work better.
>>
>> Do class objects inherit all of the Module methods?
>
> Sorry, I didn't see your message before (assuming you were asking me
> specifically).
>
> I hope someone else answers this, because I'm not sure. In others
> Rubys, Class is a subclass of Module, so all of Module's methods
> should be inherited; but I'm not sure about MacRuby.
Class is a subclass of Module in MacRuby too. And it does inherit
Module's methods. You can prove this for yourself in any given Ruby:
Module.methods - Class.methods
It will return [] if Class has every method that Module does.
— Chuck
More information about the MacRuby-devel
mailing list