Skip to content

Commit

Permalink
Merge pull request #23 from dvi/swift5_support
Browse files Browse the repository at this point in the history
swift 5 support
  • Loading branch information
dvi authored May 13, 2019
2 parents dd20aae + 13782a9 commit acb50e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion EasyDi.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 4 additions & 7 deletions Sources/EasyDi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,10 @@ open class Assembly: AssemblyInternal {
into initClosure: @autoclosure @escaping () -> ObjectType,
inject injectClosure: ObjectInjectClosure<ObjectType>? = 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<ObjectType>) in
definition.initClosure = initClosure
definition.injectClosure = injectClosure
}
}

/// This method defines object, which will be initialized and injected by assembly.
Expand Down

0 comments on commit acb50e3

Please sign in to comment.