Class: Mayu::VDOM::DOM::Text
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(document, data) ⇒ Text
constructor
A new instance of Text.
- #text? ⇒ Boolean
- #to_s ⇒ Object
Methods inherited from Node
#append_child, #element?, #insert_before, #next_sibling, #previous_sibling, #remove_child
Constructor Details
#initialize(document, data) ⇒ Text
Returns a new instance of Text.
190 191 192 193 |
# File 'lib/mayu/vdom/dom.rb', line 190 def initialize(document, data) super(document) @data = T.let(data, String) end |
Instance Method Details
#text? ⇒ Boolean
196 |
# File 'lib/mayu/vdom/dom.rb', line 196 def text? = true |
#to_s ⇒ Object
199 |
# File 'lib/mayu/vdom/dom.rb', line 199 def to_s = @data |