P-Y on Nostr: Now we're ready to use this, let's brew some coffee ``` val linker = Linker() ...
Now we're ready to use this, let's brew some coffee
```
val linker = Linker()
linker.installSingleton {
CoffeeLogger()
}
linker.installSingleton<Heater> {
ElectricHeater(get())
}
linker.install<Pump> {
Thermosiphon(get(), get())
}
linker.install {
CoffeeMaker(get(), get(), get())
}
val coffeeMaker = linker.get<CoffeeMaker>()
coffeeMaker.brew()
```
Hope you enjoyed this, please boost if you would use this DI framework 🤪
#AndroidDev
```
val linker = Linker()
linker.installSingleton {
CoffeeLogger()
}
linker.installSingleton<Heater> {
ElectricHeater(get())
}
linker.install<Pump> {
Thermosiphon(get(), get())
}
linker.install {
CoffeeMaker(get(), get(), get())
}
val coffeeMaker = linker.get<CoffeeMaker>()
coffeeMaker.brew()
```
Hope you enjoyed this, please boost if you would use this DI framework 🤪
#AndroidDev