Closed jacquescrocker closed 12 years ago
given a setting: some_key
some_key
Instead of AppConfig[:some_key] I'd like to be able to access it as AppConfig.some_key
AppConfig[:some_key]
AppConfig.some_key
For AppConfig[:location][:city] I'd like to be able to access it as AppConfig.location.city
AppConfig[:location][:city]
AppConfig.location.city
What do you think?
I was tossing around this idea a while back, but got lazy and never implemented it. ;P Should be fairly easy to do, with method_missing() just proxying to the hash-like accessor (AppConfig[]).
given a setting:
some_key
Instead of
AppConfig[:some_key]
I'd like to be able to access it asAppConfig.some_key
For
AppConfig[:location][:city]
I'd like to be able to access it asAppConfig.location.city
What do you think?