Class: HTMLTree::Comment

Inherits:
Data show all
Defined in:
lib/web/htmltools/xpath.rb,
lib/web/htmltools/element.rb

Instance Method Summary collapse

Methods inherited from Data

#attributes, #can_have_children?, #children, #data?, #method_missing, #tag, #write

Methods included from TreeElement

#add_child, #can_have_children?, #children, #content, #dump, #each, #get_elements, #has_children?, #parent, #parent=, #remove_child, #rexml_match, #root

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class HTMLTree::Data

Instance Method Details

#as_rexml_document(rparent = nil, context = {}) ⇒ Object



49
50
51
# File 'lib/web/htmltools/xpath.rb', line 49

def as_rexml_document(rparent = nil, context = {})
  node = REXML::Comment.new(@_content, parent)
end

#to_sObject



286
287
288
# File 'lib/web/htmltools/element.rb', line 286

def to_s
  '<!--' + @_content + '-->'
end