Skip to content

Instantly share code, notes, and snippets.

@privateblue
Created July 22, 2014 15:11
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 privateblue/9118af32e585d093af6d to your computer and use it in GitHub Desktop.
Save privateblue/9118af32e585d093af6d to your computer and use it in GitHub Desktop.
case class MyPreciousModelDefined(
id: Id,
name: String,
description: String,
meta: MyPreciousMeta
)
case class MyPreciousModelWithNameWithDescription(
id: Id,
name: String,
description: String
) {
def meta(value: MyPreciousMeta) = MyPreciousModelDefined(id, name, description, value)
}
case class MyPreciousModelWithName(
id: Id,
name: String
) {
def description(value: String) = MyPreciousModelWithNameWithDescription(id, name, value)
}
case class MyPreciousModel(
id: Id
) {
def name(value: String) = MyPreciousModelWithName(id, value)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment