Class: RawTextNode
- Inherits:
-
Object
- Object
- RawTextNode
- Defined in:
- lib/textile/nodes.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(text) ⇒ RawTextNode
constructor
A new instance of RawTextNode.
Constructor Details
#initialize(text) ⇒ RawTextNode
Returns a new instance of RawTextNode.
26 27 28 |
# File 'lib/textile/nodes.rb', line 26 def initialize(text) @text = text end |
Instance Method Details
#build ⇒ Object
30 31 32 |
# File 'lib/textile/nodes.rb', line 30 def build CGI.escapeHTML(@text).gsub("\n", '<br>') end |