Skip to content

Instantly share code, notes, and snippets.

@isaac-weisberg
Created March 24, 2018 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaac-weisberg/51e8102f1df29502f5f1233a3f5bfa9f to your computer and use it in GitHub Desktop.
Save isaac-weisberg/51e8102f1df29502f5f1233a3f5bfa9f to your computer and use it in GitHub Desktop.
Global environment class
class ArbitraryConfigurationData {
// content units references
}
extension Environment {
class func bootstrap(with configuration: ArbitraryConfigurationData) {
Environment.shared = Environment(with: configuration)
}
}
class Environment {
static private(set) var shared: Environment!
let config: ArbitraryConfigurationData
private init(with configuration: ArbitraryConfigurationData) {
config = configuration
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment