[LRUG] Ruby Cluetrain

Tom Lea lrug at tomlea.co.uk
Mon Oct 26 17:01:18 PDT 2009


Interestingly enough [1] (based on the simplification [2]) seems to  
work.

[1] http://gist.github.com/219144
[2] http://gist.github.com/219144/0f9a1f8b31eedbe3cae66fd6652edf324a393d87


On 26 Oct 2009, at 14:36, Tim Cowlishaw wrote:

> On 26 Oct 2009, at 14:20, James Adam wrote:
>
>> With reference to the actual FreeAgent example, the reason why I  
>> can't do "Mod::Child" is because I don't know the name of the  
>> module that "Child" (or "Contact") is going to rest in; it could be  
>> CompanyOne::Contact, or CompanyTwo::Contact, or BlahCorp::Contact.  
>> The way that we know it's "Mod::Child" in that example is an  
>> artefact of the simplification, unfortunately.
>
> Aha! ok, that makes sense. I'd be interested to see how you got  
> around that - short of manually building some sort of lookup graph  
> of your app's module space as you define new modules, I can't think  
> of a way around it. Had been considering Class#ancestors and  
> Class#constants, but those (I think) reflect inheritance heirarchy,  
> rather the heirarchy of scopes in which they're defined.
>
> Cheers,
>
> Tim
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org




More information about the Chat mailing list