[Nitro] Change settings programmatically
transfire at gmail.com
Tue Aug 8 09:17:36 EDT 2006
On 8/7/06, gabriele renzi <surrender_it at yahoo.it> wrote:
> gabriele renzi ha scritto:
> > Hi everyone,
> > sorry for the dumb question, but is there a way to change the value of a
> > setting/annotation via reflection, given
> > klass="Klass"
> > name="setting"
> > value="foo"
> > I could use eval(klass+"."+name+"="+value) or
> > constant(klass).send(name+"=",value) but I recall that there was some
> > less powerful and cleaner way, any ideas?
> > Thanks in advance.
> ok, for what is worth, I found the way, doing
> s.value= new value
Why doesn;t this work?
owner.setting name.to_sym => new valuw
> Now, if only I could dump Configuration to yaml :/
More information about the Nitro-general