On Tue, Nov 1, 2011 at 3:14 AM, Reginald Tan <redge.tan / gmail.com> 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