Skip to content

Instantly share code, notes, and snippets.

@trane
Created October 30, 2015 18:49
Show Gist options
  • Save trane/1eaddb374006d4629bef to your computer and use it in GitHub Desktop.
Save trane/1eaddb374006d4629bef to your computer and use it in GitHub Desktop.
trait Binder[A] {
def name(a: A): String
def hosts(a: A): String
}
implicit object LoginManagerBinder extends Binder[LoginManager] {
def name(manager: LoginManager): String =
manager.name
def hosts(manager: LoginManager): String =
manager.host
}
case class BindRequest[A : Binder](context: A, req: Request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment