Created
January 14, 2011 16:33
-
-
Save carlosbrando/779835 to your computer and use it in GitHub Desktop.
Exemplo de configuração usando OpenStruct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ostruct' | |
AppConfig = OpenStruct.new | |
AppConfig.default_email = "no-reply@example.com" | |
AppConfig.api_url = "staging.someapi.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Como AppConfig será acessível em todo o projeto, dá para usar esse recurso como uma forma de definir configurações globais.