From 745e4073a2db820acaadaf13cc12e1cc6e4ba2d1 Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Mon, 14 Jul 2014 21:15:46 +0400 Subject: Add hasDescription property to skip description blocks when empty. --- src/Model/DocumentationContent.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/Model/DocumentationContent.kt b/src/Model/DocumentationContent.kt index ed81b9e9..5ea745c5 100644 --- a/src/Model/DocumentationContent.kt +++ b/src/Model/DocumentationContent.kt @@ -35,6 +35,9 @@ class DocumentationContent(val summary: String, val description: String, val sec return "$summary | " + sections.joinToString() } + val hasDescription : Boolean + get() = !description.isEmpty() || sections.any() + class object { val Empty = DocumentationContent("", "", listOf()) } -- cgit