Class: Marko::Renderers::Topic
- Defined in:
- lib/marko/renderers/topic.rb
Overview
Topic renderer
Constant Summary
Constants inherited from Renderer
Instance Method Summary collapse
-
#initialize ⇒ Topic
constructor
A new instance of Topic.
- #render(topic) ⇒ Object
Constructor Details
Instance Method Details
#render(topic) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/marko/renderers/topic.rb', line 16 def render(topic) [ @title, @metadata, @content ].map{ it.render(topic) } .reject(&:empty?) .join(?\n) end |