diff options
Diffstat (limited to 'src/main/scala/reading/models/Book.scala')
-rw-r--r-- | src/main/scala/reading/models/Book.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/scala/reading/models/Book.scala b/src/main/scala/reading/models/Book.scala index b856b7d..7c4bf8a 100644 --- a/src/main/scala/reading/models/Book.scala +++ b/src/main/scala/reading/models/Book.scala @@ -3,13 +3,14 @@ package reading.models case class Book ( title: String, author: String, + period: Period, genres: Seq[Genre], - themes: Seq[Theme] + themes: Seq[Theme], + pages: Int ) extends Ordered[Book] { def compare(that: Book) = { def formatTitle(title: String) = title.toLowerCase.replaceAll("^les ", "").replaceAll("^le ", "") - formatTitle(this.title).compare(formatTitle(that.title)) } } |