Created
October 1, 2010 23:33
-
-
Save fedesilva/607063 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Vals en el constructor son propiedades: | |
// p = Person("fede","silva", 10 ) | |
// p.first | |
case class Person( val first:String, val last:String, val age:Int ) | |
// Como si fuera statics: | |
// Person.key | |
object Person extends Mapper[Person] { | |
def key = first | |
val first = "first" is { _.first } // "name" is accesor | |
val last = "last" is { _.last } | |
val age = "age" is { _.age } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment