Skip to content

Instantly share code, notes, and snippets.

@alaershov
Last active January 8, 2020 12:03
Show Gist options
  • Save alaershov/7c8130aaed17c88f549179019dd3def3 to your computer and use it in GitHub Desktop.
Save alaershov/7c8130aaed17c88f549179019dd3def3 to your computer and use it in GitHub Desktop.
Toothpick: bind to singleton
public final class RepositoryModule extends Module {
public RepositoryModule(Context context) {
bind(UserRepository.class)
.to(PrefUserRepository.class)
.singleton();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment