Skip to content

Instantly share code, notes, and snippets.

@ihrimech
Last active May 16, 2019 08:10
Show Gist options
  • Save ihrimech/a7faab64a2e3a27dd160efd28a22b53d to your computer and use it in GitHub Desktop.
Save ihrimech/a7faab64a2e3a27dd160efd28a22b53d to your computer and use it in GitHub Desktop.
A simple Human Actor with some reaction to the messages from the object HumanObjectMin.scala
class Human extends Actor with ActorLogging {
override def receive: Receive = {
case Hello => log.info("Hello dear :)")
case HowAreYou => log.info("I'm fine dude, thanks for asking")
case HowIAm(happy) =>
if (happy) log.info("I am Groot")
else log.info("Well, have a kitkat")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment