Class: Instruction
Instance Attribute Summary
Attributes inherited from TreeObject
#children, #closed, #level, #parent, #subtype, #text, #upordown, #visible
Instance Method Summary
collapse
Methods inherited from SGMLObject
#to_h, #to_s, #to_x
Methods inherited from TreeObject
#inspect, #previous
Methods included from ParseTree
#parsetree
Methods included from TextArray
#textarray
Constructor Details
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, closetags)
res << " "*(@level-1) + @text.compress + "\n"
end
|