RDoc::CodeObject#comment appears to always return a string, even if no comment has been specified. Thus the truthiness of comment cannot be used to skip rendering empty descriptions.
This commit adds a description_for helper to encapsulate properly checking comment and wrapping the rendered description in a div.
This commit also renames the full_name and short_name helpers to full_name_for and short_name_for to match description_for.
RDoc::CodeObject#comment
appears to always return a string, even if no comment has been specified. Thus the truthiness ofcomment
cannot be used to skip rendering empty descriptions.This commit adds a
description_for
helper to encapsulate properly checkingcomment
and wrapping the rendered description in adiv
.This commit also renames the
full_name
andshort_name
helpers tofull_name_for
andshort_name_for
to matchdescription_for
.