You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.0 KiB

  1. //
  2. // SendMoneyReceiptPresenter.swift
  3. // GMERemittance
  4. //
  5. // Created by gme_2 on 04/09/2018.
  6. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class SendMoneyReceiptPresenter {
  10. // MARK: Properties
  11. weak var view: SendMoneyReceiptViewInterface?
  12. var interactor: SendMoneyReceiptInteractorInput?
  13. var wireframe: SendMoneyReceiptWireframeInput?
  14. // MARK: Converting entities
  15. }
  16. // MARK: SendMoneyReceipt module interface
  17. extension SendMoneyReceiptPresenter: SendMoneyReceiptModuleInterface {
  18. func viewIsReady() {
  19. self.view?.showLoading()
  20. self.interactor?.viewIsReady()
  21. }
  22. }
  23. // MARK: SendMoneyReceipt interactor output interface
  24. extension SendMoneyReceiptPresenter: SendMoneyReceiptInteractorOutput {
  25. func show(model: SendMoneyReciept) {
  26. self.view?.hideLoading()
  27. self.view?.show(model: model)
  28. }
  29. func show(error: Error) {
  30. self.view?.hideLoading()
  31. self.view?.show(error: error.localizedDescription)
  32. }
  33. }