Skip to content

Instantly share code, notes, and snippets.

@dariathecracker
Last active June 4, 2020 12:09
Show Gist options
  • Save dariathecracker/61006805aa564e266dee7c060a775198 to your computer and use it in GitHub Desktop.
Save dariathecracker/61006805aa564e266dee7c060a775198 to your computer and use it in GitHub Desktop.
MenuCommandParser
package ioleo.tictactoe.parser
import ioleo.tictactoe.domain.MenuCommand
import zio.ZIO
import zio.macros.annotation.{accessible, mockable}
@accessible(">")
@mockable
trait MenuCommandParser {
val menuCommandParser: MenuCommandParser.Service[Any]
}
object MenuCommandParser {
trait Service[R] {
def parse(input: String): ZIO[R, Nothing, MenuCommand]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment