Skip to content

Instantly share code, notes, and snippets.

@Raiden18
Created May 10, 2022 13:15
Show Gist options
  • Save Raiden18/b039a472c8b9fd767f04d207b98c76ea to your computer and use it in GitHub Desktop.
Save Raiden18/b039a472c8b9fd767f04d207b98c76ea to your computer and use it in GitHub Desktop.
Information Expert. Interactor And Model class compare
class AnotherInteractor(
private val cartInteractor: CartInteractor,
private val anotherRepository: AnotherRepository
){
fun doSomething() {
val cart = cartInteractor.getCart()
anotherRepository.doSomething(cart.productsApproximatePrice)
// Rest of the code
}
}
class AnotherInteractor(
private val cartInteractor: CartInteractor,
private val anotherRepository: AnotherRepository
){
fun doSomething() {
val cart = cartInteractor.getCart()
val productsApproximatePrice = cartInteractor.getProductsApproximatePrice(cart)
anotherRepository.doSomething(productsApproximatePrice)
// rest of the code
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment