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.
|
|
// // ExchangeRatesPresenter.swift // GMERemittance // // Created by gme_2 on 24/08/2018. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. //
import Foundation
class ExchangeRatesPresenter { // MARK: Properties weak var view: ExchangeRatesViewInterface? var interactor: ExchangeRatesInteractorInput? var wireframe: ExchangeRatesWireframeInput? // MARK: Converting entities }
// MARK: ExchangeRates module interface
extension ExchangeRatesPresenter: ExchangeRatesModuleInterface { func fetchExchangeRate() { view?.showLoading() interactor?.fetchExchangeRate() } func exchangeCalculate(use model: ExchangeRateRequestModel) { view?.showLoading() interactor?.exchangeCalculate(use: model) } }
// MARK: ExchangeRates interactor output interface
extension ExchangeRatesPresenter: ExchangeRatesInteractorOutput { func setModel(with model: [ExchangeRateModel]?) { view?.hideLoading() view?.setModel(with: model) } func setModel(with model: ExchangeRateDetailModel?) { view?.hideLoading() view?.setModel(with: model) } func setError(with error: Error) { view?.hideLoading() view?.setError(with: error) } }
|