[Nitro] Simpler configuration method?
george.moschovitis at gmail.com
Sun Feb 4 06:58:50 EST 2007
> Did you decide on this? Dod you do any work on this? Did you try
> making it an instatiable class?
Nope, I haven't decided on this. I still believe that using globals is valid
for this case, but I am sure that a lot of people will go mad if they see
the $ symbol. It is amusing that people consider this unacceptable:
$conf_template_root_dir = '...'
but this acceptable:
Conf["Template.root_dir"] = '...'
Conf[:Template][:root_dir] = '...' <--- this is curently used,
Template.root_dir is syntax sugar for Conf[:Template][:root_dir] atm.
as they are exactly the same thing...
I think that global variables are the natural choice for *global* settings,
but since everyone else disagrees I am probably wrong so I will leave the
configuration system as it is for the moment. I will just try to add some
kind of syntactic sugar for Conf[:Template][:root_dir] initialization. I am
thinking something along the lines:
Template.root_dir = ...
Og.create_tables = ...
Configuration.Template.root_dir = ...
Configuration.Og.create_tables = ...
Perhaps you can suggest something better? In any case I need to move the
final solution to facets. (still trying to get rid of the glue gem).
As you are the Ruby guru here perhaps you could come up with a better
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nitro-general