Class: Instruction
- Inherits:
-
SGMLObject
- Object
- TreeObject
- SGMLObject
- Instruction
- 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) ⇒ Instruction
constructor
A new instance of Instruction.
- #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) ⇒ Instruction
Returns a new instance of Instruction.
61 62 63 64 |
# File 'lib/rwd/sgml.rb', line 61 def initialize(text) super() @text = text end |
Instance Method Details
#prechildren_to_sgml(res) ⇒ Object
66 67 68 |
# File 'lib/rwd/sgml.rb', line 66 def prechildren_to_sgml(res) res << "#{@text}" end |
#prechildren_to_x(res, closetags) ⇒ Object
42 43 44 |
# File 'lib/rwd/xml.rb', line 42 def prechildren_to_x(res, ) res << " "*(@level-1) + @text.compress + "\n" end |