Created
June 9, 2020 08:46
-
-
Save vedon/d42cd6ae611f9d5dc222564d24256ce2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import Foundation | |
import FeatureService | |
public class Feature2 { | |
public struct Dependencies { | |
let feature1: Feature1Service | |
let feature3: Feature3Service | |
public init(feature1: Feature1Service, feature3: Feature3Service) { | |
self.feature1 = feature1 | |
self.feature3 = feature3 | |
} | |
} | |
private let dependencies: Feature2.Dependencies | |
public init(dependencies: Feature2.Dependencies) { | |
self.dependencies = dependencies | |
} | |
public func doSomething() { | |
print("Feature2 do something") | |
dependencies.feature1.doSomething() | |
dependencies.feature3.doSomething() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment