Class: TextNode
- Inherits:
-
Object
- Object
- TextNode
- Defined in:
- lib/textile/nodes.rb
Instance Method Summary collapse
-
#build ⇒ Object
Hook for booru monkeypatch.
-
#initialize(text) ⇒ TextNode
constructor
A new instance of TextNode.
Constructor Details
#initialize(text) ⇒ TextNode
Returns a new instance of TextNode.
15 16 17 |
# File 'lib/textile/nodes.rb', line 15 def initialize(text) @text = text end |
Instance Method Details
#build ⇒ Object
Hook for booru monkeypatch
20 21 22 |
# File 'lib/textile/nodes.rb', line 20 def build CGI.escapeHTML(@text).gsub("\n", '<br>') end |