Class: XmlUtils::CData
Instance Attribute Summary
Attributes inherited from Text
#raw, #unnormalized, #value
Attributes inherited from Node
#parent
Instance Method Summary
collapse
Methods inherited from Text
#<=>, #empty?, #to_s
Methods inherited from ChildNode
#write
Methods inherited from Node
#deep_clone, #document, #each, #next_sibling, #previous_sibling, #remove, #root, #to_s
Constructor Details
#initialize(value, respect_whitespace = false, parent = nil) ⇒ CData
Returns a new instance of CData.
183
184
185
186
|
# File 'lib/xmlutils/node.rb', line 183
def initialize(value, respect_whitespace = false, parent = nil)
super(value, respect_whitespace, parent)
@raw = true
end
|
Instance Method Details
#clone ⇒ Object
192
193
194
|
# File 'lib/xmlutils/node.rb', line 192
def clone
CData.new(@value, true)
end
|
#node_type ⇒ Object
188
189
190
|
# File 'lib/xmlutils/node.rb', line 188
def node_type
:cdata
end
|
#write_content(output, indent = 0) ⇒ Object
196
197
198
|
# File 'lib/xmlutils/node.rb', line 196
def write_content(output, indent = 0)
output << "<![CDATA[#{@value}]]>"
end
|