summaryrefslogtreecommitdiffstats
path: root/src/main/scala/myapp/cake/services.scala
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-02-13 10:26:39 -0600
committerJesse Luehrs <doy@tozt.net>2013-02-13 10:26:39 -0600
commit6e743ddc61bd70594a9f039c72715b183de7786e (patch)
tree0d537e67499178a1f6c3e696013f24a4e027d445 /src/main/scala/myapp/cake/services.scala
parent5e377f152de4073c79abcf4efb4507306604b170 (diff)
downloadscala-di-test-6e743ddc61bd70594a9f039c72715b183de7786e.tar.gz
scala-di-test-6e743ddc61bd70594a9f039c72715b183de7786e.zip
allow non-singleton lifecycle services too
Diffstat (limited to 'src/main/scala/myapp/cake/services.scala')
-rw-r--r--src/main/scala/myapp/cake/services.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/myapp/cake/services.scala b/src/main/scala/myapp/cake/services.scala
index 99be3d5..6d4a860 100644
--- a/src/main/scala/myapp/cake/services.scala
+++ b/src/main/scala/myapp/cake/services.scala
@@ -6,7 +6,7 @@ import myapp.logger.Logger
trait HasApplication {
type ApplicationType
- val application: ApplicationType with ApplicationService
+ def application (): ApplicationType with ApplicationService
trait ApplicationService {
def run (): Unit
@@ -16,7 +16,7 @@ trait HasApplication {
trait HasDatabase {
type DatabaseType
- val database: DatabaseType with DatabaseService
+ def database (): DatabaseType with DatabaseService
trait DatabaseService extends Database
}
@@ -24,7 +24,7 @@ trait HasDatabase {
trait HasLogger {
type LoggerType
- val logger: LoggerType with LoggerService
+ def logger (): LoggerType with LoggerService
trait LoggerService extends Logger
}