Skip to content

Instantly share code, notes, and snippets.

@amuradyan
Created May 14, 2018 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amuradyan/42a0401191eb1a7bf26485497541e945 to your computer and use it in GitHub Desktop.
Save amuradyan/42a0401191eb1a7bf26485497541e945 to your computer and use it in GitHub Desktop.
package mailer
/**
* Created by spectrum on 5/14/2018.
*/
class Mail(from: String, to: String)
object send {
def a(mail: Mail) = ???
}
object reply {
def to(mail: Mail): MailBuilder = {
MailBuilder(mail)
}
}
case class MailBuilder(mail: Mail) {
def withMessage(message: String) = ???
}
object Mailer {
def main(args: Array[String]) {
val mailFromClient = new Mail("", "")
send a new Mail("asd", "asd")
reply to mailFromClient withMessage "asd"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment