From: Robert Klemme Date: 2013-03-14T22:30:58+09:00 Subject: Re: RubyExcel class. Useful? On Thu, Mar 14, 2013 at 1:37 PM, Joel Pearson wrote: > 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, OK, that sounds reasonable. > and find the workbook from the sheet. What functionality for? > 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. This is certainly not a case for inheritance. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/