From: Robert Klemme Date: 2011-04-12T17:51:04+09:00 Subject: Re: Copying parameters to singleton class On Tue, Apr 12, 2011 at 10:30 AM, Lars Olsson wrote: > I've now incorporated your solution into my code and it works very > well. Fine! (Btw, which one did you pick?) > I still have a small question though. What's the reason for > freezing the options? I can see no obvious explanation for it except > that one might not want to change them by accident. Or is there > another reason for this? No, that's the only reason. Note also that this is not 100% safe because elements in the Hash are not frozen so for a more robust solution you would need to recursively freeze everything contained in the Hash. I still like it to freeze the Hash to avoid simple errors and document in code that this is really meant to be constant. (At least that's what I guessed you wanted them to be.) Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/