diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-02-28 22:23:35 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-02-28 22:32:01 -0600 |
commit | 2a37a2e09e6b56d86fd20d16a8f0b7907113c2e2 (patch) | |
tree | 31c6da40c25c8879b36d92fe559c7be1fe990bf0 /src/main/scala/myapp/cake/services.scala | |
parent | 6e743ddc61bd70594a9f039c72715b183de7786e (diff) | |
download | scala-di-test-master.tar.gz scala-di-test-master.zip |
Diffstat (limited to 'src/main/scala/myapp/cake/services.scala')
-rw-r--r-- | src/main/scala/myapp/cake/services.scala | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/main/scala/myapp/cake/services.scala b/src/main/scala/myapp/cake/services.scala index 6d4a860..c9579c6 100644 --- a/src/main/scala/myapp/cake/services.scala +++ b/src/main/scala/myapp/cake/services.scala @@ -1,30 +1,32 @@ -package myapp.cake.services +package myapp.cake -import myapp.database.Database -import myapp.logger.Logger +object services { + import database.Database + import logger.Logger -trait HasApplication { - type ApplicationType + trait HasApplication { + type ApplicationType - def application (): ApplicationType with ApplicationService + def application: ApplicationType with ApplicationService - trait ApplicationService { - def run (): Unit + trait ApplicationService { + def run: Unit + } } -} -trait HasDatabase { - type DatabaseType + trait HasDatabase { + type DatabaseType - def database (): DatabaseType with DatabaseService + def database: DatabaseType with DatabaseService - trait DatabaseService extends Database -} + trait DatabaseService extends Database + } -trait HasLogger { - type LoggerType + trait HasLogger { + type LoggerType - def logger (): LoggerType with LoggerService + def logger: LoggerType with LoggerService - trait LoggerService extends Logger + trait LoggerService extends Logger + } } |