Created
January 12, 2018 13:30
-
-
Save pdabrowski6/293ce0b21e5273376fa885b0acc4e97c to your computer and use it in GitHub Desktop.
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
class Server | |
attr_accessor :env, :domain | |
end | |
class Config | |
def initialize(&block) | |
instance_eval &block | |
end | |
def server | |
@server ||= Server.new | |
end | |
end | |
Config.new do | |
server.env = 'production' | |
server.domain = 'domain.com' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment