Class: HTMLTree::Comment

Inherits:
Data
  • Object
show all
Defined in:
lib/html/xpath.rb,
lib/html/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, #has_children?, #parent, #parent=, #path, #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



50
51
52
# File 'lib/html/xpath.rb', line 50

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

#to_sObject



313
314
315
# File 'lib/html/element.rb', line 313

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