putting away HashWithIndifferentAccess

Aria Stewart aredridel at nbtsc.org
Tue Sep 25 18:32:48 EDT 2007


> I'm not too hot on [symbol] and [string] equivalence.  But I do like
> to call the query string vars like methods.  What do you think about
> using OpenStruct instead?
> 
> I've been testing with this:
> 
>   class H < OpenStruct
>     def u h;for k,v in h;@table[k.to_sym]=v;new_ostruct_member(k);end
>     def self.[] *a;new *a;end
>   en
> 

I'm a fan!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/camping-list/attachments/20070925/6fb1bf83/attachment.bin 


More information about the Camping-list mailing list