[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Prettier solution to circular dependency

seebs

6/11/2007 11:37:00 AM

In message <9bb72e130706102242y13e635d0ned1020d53376157a@mail.gmail.com>, "Helder Ribeiro" writ
es:
>The circular dependency hints at not having the module at all and just
>putting the instance method element_factory() into Element itself but
>there are those other two classes that include it, so I can't do that.
>
>Thanks a lot for any ideas! :-)

Forward declaration?

class Element
end

class ElementFactory
...
end

class Element
# actual content goes here!
end

-s