Class: Mayu::VDOM::DOM::Comment
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #comment? ⇒ Boolean
-
#initialize(document, data) ⇒ Comment
constructor
A new instance of Comment.
- #to_s ⇒ Object
Methods inherited from Node
#append_child, #element?, #insert_before, #next_sibling, #previous_sibling, #remove_child, #text?
Constructor Details
#initialize(document, data) ⇒ Comment
Returns a new instance of Comment.
204 205 206 207 |
# File 'lib/mayu/vdom/dom.rb', line 204 def initialize(document, data) super(document) @data = T.let(data, String) end |
Instance Method Details
#comment? ⇒ Boolean
210 |
# File 'lib/mayu/vdom/dom.rb', line 210 def comment? = true |
#to_s ⇒ Object
213 |
# File 'lib/mayu/vdom/dom.rb', line 213 def to_s = "<!-- mayu-id: #{id}. #{@data} -->" |