Oshuma / app_config

Simple Ruby framework-agnostic application configuration.
http://oshuma.github.io/app_config/
MIT License
20 stars 7 forks source link

OStruct like access #11

Closed jacquescrocker closed 12 years ago

jacquescrocker commented 14 years ago

given a setting: some_key

Instead of AppConfig[:some_key] I'd like to be able to access it as AppConfig.some_key

For AppConfig[:location][:city] I'd like to be able to access it as AppConfig.location.city

What do you think?

Oshuma commented 14 years ago

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[]).