Skip to content

buildMicroDownUsing: withComment: should be simplified #37

@kasperosterbye

Description

@kasperosterbye

The top template is the one that adds the header with the class name, and inserts the rendered comment.

Hence most subclasses follow this template:

buildMicroDownUsing: aBuilder withComment: aString
	
	super buildMicroDownUsing: aBuilder withComment: aString.
	self addSomeSectionOfRelevanceToSpecificClass: aBuilder

I suggest the implementation in Class is changed to:

buildMicroDownUsing: aBuilder withComment: aString
	
	aBuilder 
		header: [ aBuilder text: 'Class: '.
					aBuilder text: self name ] withLevel: 1;
		horizontalLine;
		text: aString.
	self addDocumentationSections: aBuilder "empty method at class level"

And these methods then follow the pattern of:

addDocumentationSections: aBuilder
	super addDocumentationSections: aBuilder.
	"Add more stuff using aBuilder"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions