From: Michael Kohl Date: 2011-11-01T19:13:46+09:00 Subject: Re: how to make interface explicit with Hash stores? On Tue, Nov 1, 2011 at 3:14 AM, Reginald Tan wrote: > I have a class that uses hash as its internal store. What's a good way > to communicate the interface of my methods. Do you need to leak this implementation detail? You could make add_content a two argument method and changing it like this: def add_content(k, v) @hash.merge(Hash[k,v]) # or @hash.merge({k => v}) end -- Michael Kohl http://citizen428.net | http://twitter.com/citizen428