diff --git a/EasyDi.podspec.json b/EasyDi.podspec.json index e9cfa83..9975202 100644 --- a/EasyDi.podspec.json +++ b/EasyDi.podspec.json @@ -2,7 +2,7 @@ "name": "EasyDi", "version": "1.4.1", "summary": "Effective DI library for rapid development in 200 lines of code", - "description": "Swift 3 and 4, iOS 8+\nEasyDi contains a dependency container for Swift. The syntax of this library was specially designed for rapid development and effective use. It fits in 200 lines, thus can do everything you need for grown-up DI library:\n- Objects creating with dependencies and injection of dependencies into existing ones\n- Separation into assemblies\n- Types of dependency resolution: objects graph, singleton, prototype\n- Objects substitution and dependency contexts for tests", + "description": "Swift 3 and 4 and 5, iOS 8+\nEasyDi contains a dependency container for Swift. The syntax of this library was specially designed for rapid development and effective use. It fits in 200 lines, thus can do everything you need for grown-up DI library:\n- Objects creating with dependencies and injection of dependencies into existing ones\n- Separation into assemblies\n- Types of dependency resolution: objects graph, singleton, prototype\n- Objects substitution and dependency contexts for tests", "homepage": "https://github.com/AndreyZarembo/EasyDi.git", "license": { "type": "MIT", diff --git a/Sources/EasyDi.swift b/Sources/EasyDi.swift index 78c4be8..5f3ae0c 100644 --- a/Sources/EasyDi.swift +++ b/Sources/EasyDi.swift @@ -273,13 +273,10 @@ open class Assembly: AssemblyInternal { into initClosure: @autoclosure @escaping () -> ObjectType, inject injectClosure: ObjectInjectClosure? = nil ) { - let _: ObjectType = self.define( - key: key, - definitionKey: definitionKey, - scope: scope, - init: initClosure, - inject: injectClosure - ) + let _: ObjectType = define(key: key, definitionKey: definitionKey, scope: scope) { (definition:Definition) in + definition.initClosure = initClosure + definition.injectClosure = injectClosure + } } /// This method defines object, which will be initialized and injected by assembly.