Skip to content

Instantly share code, notes, and snippets.

@nbarishok
Created April 4, 2016 20:58
Show Gist options
  • Save nbarishok/7564086ad8ae3f9b4c132cf71b579c8c to your computer and use it in GitHub Desktop.
Save nbarishok/7564086ad8ae3f9b4c132cf71b579c8c to your computer and use it in GitHub Desktop.
@Module
public class WeatherModule {
@Provides @PerFragment
GetWeatherInMoscowInteractor provideGetWeatherInterator(WeatherRepository repo) {
return new GetWeatherInMoscowUseCase(repo);
}
@Provides @PerFragment
WeatherMapper provideWeatherMapper() {
return new WeatherMapperImpl();
}
@Provides
@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