;
abstract suspend fun ApplicationCall.respondQuote(quote: Quote)
-
- companion object {
- init {
- assert(entries.toSet().size == entries.distinctBy { it.format }.size) { "Got duplicate QuoteFormat names" }
- assert(entries.any { it.format == null }) { "Did not get default QuoteFormat" }
- }
-
- fun byFormat(format: String? = null) = entries.singleOrNull { format.equals(it.format, ignoreCase = true) } ?: entries.single { it.format == null }
- }
}
object QuoteFormatSerializer : KeyedEnumSerializer<QuoteFormat>(QuoteFormat.entries, QuoteFormat::format)