Created
April 4, 2016 20:59
-
-
Save nbarishok/3fc3043b2d4b2f7bc7c48e221ed6ac3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Module | |
public class WeatherModule { | |
@Provides @PerFragment | |
GetWeatherInMoscowInteractor provideGetWeatherInterator(WeatherRepository repo) { | |
return new GetWeatherInMoscowUseCase(repo); | |
} | |
@Provides @PerFragment | |
WeatherMapper provideWeatherMapper() { | |
return new WeatherMapperImpl(); | |
} | |
@Provides | |
@PerFragment | |
WeatherPresenter provideCommunicationBus(@Named("presenter") WeatherPresenter presenter) { | |
return new WeatherCommunicationBus(presenter); | |
} | |
@Provides | |
@Named("presenter") | |
@PerFragment | |
WeatherPresenter provideWeatherPresenter(GetWeatherInMoscowInteractor getWeather, WeatherMapper mapper) { | |
return new WeatherPresenterImpl(getWeather, mapper); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment