Class: MarkdownUI::Content::Text
- Inherits:
-
Object
- Object
- MarkdownUI::Content::Text
- Defined in:
- lib/markdown-ui/content/text.rb
Instance Method Summary collapse
-
#initialize(content, klass = nil) ⇒ Text
constructor
A new instance of Text.
- #render ⇒ Object
Constructor Details
#initialize(content, klass = nil) ⇒ Text
Returns a new instance of Text.
6 7 8 9 |
# File 'lib/markdown-ui/content/text.rb', line 6 def initialize(content, klass = nil) @content = content @klass = klass end |
Instance Method Details
#render ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/markdown-ui/content/text.rb', line 11 def render content = if @klass klass = "#{@klass}" MarkdownUI::StandardTag.new(@content, klass).render else "#{@content.strip}" end content end |