Skip to content

Instantly share code, notes, and snippets.

@leogrim
Last active May 2, 2016 17:40
Show Gist options
  • Save leogrim/6c0b3306ca2feb3622cfc50c53d4f229 to your computer and use it in GitHub Desktop.
Save leogrim/6c0b3306ca2feb3622cfc50c53d4f229 to your computer and use it in GitHub Desktop.
case class FunctionalModuleAInProduction extends FunctionalModuleA {
def configure() {
bind[ClassA].to[ImplementationA]
}
}
case class FunctionalModuleAInDevelopment extends FunctionalModuleA {
def configure() {
bind[ClassA].to[FakeImplementationA]
}
}
case class FunctionalModuleBInProduction extends FunctionalModuleB {
def configure() {
bind[ClassB].to[ImplementationB]
}
}
trait FunctionalModuleCDinProduction extends FunctionalModuleCD {
def configure() {
bind[ClassC].to[CommonImplementation]
}
}
case class FunctionalModuleCDForServiceA extends FunctionalModuleCDInProduction {
def classDProviderForServiceA: ClassD = serviceAInstanceOfClassD
}
case class FunctionalModuleCDForServiceB extends FunctionalModuleCDInProduction {
def classDProviderForServiceB: ClassD = serviceBInstanceOfClassD
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment