Skip to content

Instantly share code, notes, and snippets.

@cjbottaro
Created September 8, 2009 17:43
Show Gist options
  • Save cjbottaro/183094 to your computer and use it in GitHub Desktop.
Save cjbottaro/183094 to your computer and use it in GitHub Desktop.
# app_config.yml
# --------------
# development:
# env: dev
# server: dev.domain.com
# production:
# env: prod
# server: prod.domain.com
#
# local_override.yml
# ------------------
# server: localhost
# new_value: blah
AppConfig = ApplicationConfig.new("app_config.yml")
AppConfig.use_environment!("development", :override_with => "local_override.yml")
AppConfig.env
# => "dev"
AppConfig.server
# => "localhost"
AppConfig.new_value
# => "blah"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment