Skip to content

Instantly share code, notes, and snippets.

View Otbivnoe's full-sized avatar

Nikita Ermolenko Otbivnoe

View GitHub Profile
@Otbivnoe
Otbivnoe / ServicesComposition.swift
Created April 13, 2017 02:55 — forked from artemnovichkov/ServicesComposition.swift
Using protocol composition and generics for dependency injection in Interactors (VIPER, SOA, another cool keywords...)
protocol HasService1 {
var service1: Service1 { get }
}
protocol HasService2 {
var service2: Service2 { get }
}
class Service1 {}
class Service2 {}