Class: HTMLTree::Special

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



55
56
57
58
# File 'lib/web/htmltools/xpath.rb', line 55

def as_rexml_document(rparent = nil, context = {})
  node = REXML::Instruction.new(@_content,
    context[:respect_whitespace] || false, rparent)
end

#to_sObject



292
293
294
# File 'lib/web/htmltools/element.rb', line 292

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