Created
March 24, 2018 16:45
-
-
Save isaac-weisberg/51e8102f1df29502f5f1233a3f5bfa9f to your computer and use it in GitHub Desktop.
Global environment class
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 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