ruby - Path to dynamic object? -
i have system_settings table has key , value columns. key looks general.site.something.config
, value simple string.
i'd have static class which, upon initialization, reads settings , caches values. furthermore, i'd able access settings in oo way, such systemsetting.cache.general.site.something.config
in order pull value key. turning rows in table tree.
is there easy way in ruby 1.8.7?
tl;dr, no. no easy (read 'built-in') way atleast.
the syntax want not way things happen in ruby (without over-plumbing, is). have @ over-plumbing i'm referring to, have @ code wrote example demonstrates of desired functionality want. wouldn't suggest using though , that's same reason i'm not posting here.
Comments
Post a Comment