------art_1003_29647373.1222387765472
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Wed, Sep 24, 2008 at 12:43 AM, Charles Oliver Nutter <
charles.nutter / sun.com> wrote:

> Paul Brannan wrote:
>
>> I'm unclear why this couldn't be implemented using #inherited.
>>
>
> It certainly could, but that requires that you have freedom to install your
> inherited hook ahead of time and that you don't interfere with an existing
> hook and that hooks added after yours reciprocate and that you do all the
> bookkeeping yourself, including dealing with your concern below. It's a lot
> of hassle for a feature that has obvious utility.


FWIW

Rails is a bit inconsistent here.

ActiveSupport implements Class#subclasses to return an array of class names
using ObjectSpace

ActiveRecord::Base implements a subclasses class method using #inherited,
which returns an array of class Objects.

I discovered this in our Rails app at work when facets got exorcised, facets
implements Class#subclasses using ObjectSpace and returns an array of class
objects.

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

------art_1003_29647373.1222387765472
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dirtr">On Wed, Sep 24, 2008 at 12:43 AM, Charles Oliver Nutter <span dirtr">&lt;<a hrefailto:charles.nutter / sun.com">charles.nutter / sun.com</a>&gt;</span> wrote:<br><div classmail_quote"><blockquote classmail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div classh2E3d">Paul Brannan wrote:<br>
<blockquote classmail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m unclear why this couldn&#39;t be implemented using #inherited.<br>
</blockquote>
<br></div>
It certainly could, but that requires that you have freedom to install your inherited hook ahead of time and that you don&#39;t interfere with an existing hook and that hooks added after yours reciprocate and that you do all the bookkeeping yourself, including dealing with your concern below. It&#39;s a lot of hassle for a feature that has obvious utility.</blockquote>
</div><br>FWIW<br><br>Rails is a bit inconsistent here.<br><br>ActiveSupport implements Class#subclasses to return an array of class names using ObjectSpace<br><br>ActiveRecord::Base implements a subclasses class method using #inherited, which returns an array of class Objects.<br>
<br>I discovered this in our Rails app at work when facets got exorcised, facets implements Class#subclasses using ObjectSpace and returns an array of class objects.<br clear
ll"><br>-- <br>Rick DeNatale<br><br>My blog on Ruby<br>
<a hrefttp://talklikeaduck.denhaven2.com/">http://talklikeaduck.denhaven2.com/</a><br>
</div>

------art_1003_29647373.1222387765472--