On Tue, 25 Sep 2007 17:26:37 -0500, why the lucky stiff <[EMAIL PROTECTED]> wrote:
> 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 > > Or, you know, just Hash is okay, right folks? I'd be fine with just Hash. OpenStruct is cool and all, but if this is to be used for query parameters you're going to have to be really paranoid about key names (e.g. imagine a query with a variable named new_ostruct_member). -mental _______________________________________________ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list