Skip to content

Instantly share code, notes, and snippets.

@heymichaelp
Last active August 29, 2015 14:02
Show Gist options
  • Save heymichaelp/58f8e3f439b3ef17953a to your computer and use it in GitHub Desktop.
Save heymichaelp/58f8e3f439b3ef17953a to your computer and use it in GitHub Desktop.
Value Objects: Example
var firstStudent = {grade: new Grade(0.45)};
var secondStudent = {grade: new Grade(0.70)};
firstStudent.grade.isPassing() //=> false
firstStudent.grade.isBetterThan(secondStudent.grade); //=> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment