[Nitro] Simpler configuration method?
George Moschovitis
george.moschovitis at gmail.com
Sun Feb 4 06:58:50 EST 2007
>
> George,
>
> 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"] = '...'
or
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:
Configuration.setup do
Template.root_dir = ...
Og.create_tables = ...
end
instead of
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
solution.
regards,
George.
--
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070204/0a5b054d/attachment-0001.html
More information about the Nitro-general
mailing list