blob: 879cd98fc32269981ffa7bd331483b25c787d70e [file] [log] [blame]
package model
import groovy.transform.CompileStatic
@CompileStatic
class Library extends LinkedHashMap<String, Book> {
void book(String title, Closure bookClosure) {
def book = new Book(title: title)
def clone = bookClosure.rehydrate(book, book, book)
clone()
put(title, book)
}
}