Skip to content

Instantly share code, notes, and snippets.

@tom025
Created April 7, 2011 11:04
Show Gist options
  • Save tom025/907573 to your computer and use it in GitHub Desktop.
Save tom025/907573 to your computer and use it in GitHub Desktop.
class Configuration
attr_accessor :tail_logs, :max_connections, :admin_password
def initialize
@app_server = AppServer.new
end
def app_server
yield(@app_server) if block_given?
@app_server
end
class AppServer
attr_accessor :port, :admin_password
end
end
def configure
config = Configuration.new
yield(config)
config
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment