From: Joel Pearson Date: 2013-03-14T21:37:16+09:00 Subject: Re: RubyExcel class. Useful? Robert Klemme wrote in post #1101581: >> I've ended up with a circular reference and I'm not sure of the best way >> to proceed from here. > > It may be an indication that you got your design wrong. Why did you > think you need the circular references in the first place? I need a Sheet to belong to a workbook, but also be able to be copied or moved from one workbook to another. I need to be able to find the sheet from the workbook, and find the workbook from the sheet. Originally I thought that would be some sort of inheritance chain, but I can't use inheritance because Sheet is not a type of Workbook. > I'd probably only have one level of namespaces for this, e.g. module > RubyExcel and put all classes in there. You won't have too many > classes to distribute across a multitude of namespaces. Perhaps a RubyExcel Module with the first class called Workbook would be more suitable. -- Posted via http://www.ruby-forum.com/.