Class: MinimalMarkdown::Nodes::Text
- Inherits:
-
Struct
- Object
- Struct
- MinimalMarkdown::Nodes::Text
- Defined in:
- lib/minimal_markdown/nodes/text.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text
4 5 6 |
# File 'lib/minimal_markdown/nodes/text.rb', line 4 def text @text end |
Instance Method Details
#render(output) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/minimal_markdown/nodes/text.rb', line 5 def render(output) if text.is_a?(Array) text.each { |child| child.render(output) } else output << CGI.escapeHTML(text) end end |