From: "ara.t.howard" Date: 2008-07-06T08:08:47+09:00 Subject: Re: Parameter name reflection On Jul 5, 2008, at 2:36 PM, Oliver Saunders wrote: > Thanks Matthias that looks pretty cool. > > @ara.t.howard: this is useful as a meta-programming technique. > Here's an > example: > > # controller implementation > def index_action(id, style, redirected_from) > local_variables # pre-populated with values from HTTP request > params > end > -- > Posted via http://www.ruby-forum.com/. > bad idea ihmo - it'll be almost impossible to map valid http request names to ruby vars, for instance you'll have 'a var with a space' #=> ?? 'a var with a /' #=> ?? etc etc in addition the only way you can do that is with a heavy duty eval process (vars set by eval are only available to further evals) which makes for a super slow request loop. so this sounds like it'll end up being a huge stack of evals - not metaprogramming - unless i'm misunderstanding. can you sketch out an example of what you'd like to do for us? cheers. a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama