class Text

Extends Child
Includes Comparable
Represents text in an XML document

Attributes

Methods


Attributes

raw (accessor) string is String content, raw is a boolean
string (accessor) string is String content, raw is a boolean

Methods

<=>

Arguments

other
a String or a Text
Returns true if the content of this object matches the supplied argument's content

clone


initialize

Arguments

arg
if a String, the content is set to the String. If a Text, the object is shallowly cloned. If a Source, the source is parsed for text content up to the next element. If a parent, the parent of this object is set to the argument.
whitespace<false>
(boolean, optional) if true, whitespace is respected
parent<nil>
(Parent, optional) if given, the parent of this object will be set to the argument
pattern<PATTERN>

Constructor

Text

Arguments

parse_stream source
listener

to_s


write

Arguments

writer
indent<0>