Class: Mayu::VDOM::DOM::Text

Inherits:
Node
  • Object
show all
Defined in:
lib/mayu/vdom/dom.rb

Instance Attribute Summary

Attributes inherited from Node

#id, #parent

Instance Method Summary collapse

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

Returns:

  • (Boolean)


196
# File 'lib/mayu/vdom/dom.rb', line 196

def text? = true

#to_sObject



199
# File 'lib/mayu/vdom/dom.rb', line 199

def to_s = @data