Class: Special
- Inherits:
-
SGMLObject
- Object
- TreeObject
- SGMLObject
- Special
- Defined in:
- lib/rwd/xml.rb,
lib/rwd/sgml.rb
Instance Attribute Summary
Attributes inherited from TreeObject
#children, #closed, #level, #parent, #subtype, #text, #upordown, #visible
Instance Method Summary collapse
-
#initialize(text) ⇒ Special
constructor
A new instance of Special.
- #prechildren_to_sgml(res) ⇒ Object
- #prechildren_to_x(res, closetags) ⇒ Object
Methods inherited from SGMLObject
Methods inherited from TreeObject
Methods included from ParseTree
Methods included from TextArray
Constructor Details
#initialize(text) ⇒ Special
Returns a new instance of Special.
50 51 52 53 |
# File 'lib/rwd/sgml.rb', line 50 def initialize(text) super() @text = text end |
Instance Method Details
#prechildren_to_sgml(res) ⇒ Object
55 56 57 |
# File 'lib/rwd/sgml.rb', line 55 def prechildren_to_sgml(res) res << "#{@text}" end |
#prechildren_to_x(res, closetags) ⇒ Object
36 37 38 |
# File 'lib/rwd/xml.rb', line 36 def prechildren_to_x(res, ) res << " "*(@level-1) + @text.compress + "\n" end |