Skip to content

Instantly share code, notes, and snippets.

@privateblue
Created July 22, 2014 15:07
Show Gist options
  • Save privateblue/25a5321977411f417b8c to your computer and use it in GitHub Desktop.
Save privateblue/25a5321977411f417b8c to your computer and use it in GitHub Desktop.
case class MyPreciousModel(
id: Id,
name: Option[String] = None,
description: Option[String] = None,
meta: Option[MyPreciousMeta] = None
) {
def setName(value: String) = this.copy(name = Some(value))
def setDescription(value: String) = this.copy(description = Some(value))
def setMeta(value: MyPreciousMeta) = this.copy(meta = Some(value))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment