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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -