Class: Hpricot::CData

Inherits:
Text show all
Defined in:
lib/hpricot/tag.rb

Constant Summary

Constants included from Hpricot

ElementContent, ElementExclusions, ElementInclusions, NamedCharacters, NamedCharactersPattern, OmittedAttrName

Instance Attribute Summary

Attributes inherited from Text

#normalized_rcdata, #rcdata

Attributes inherited from BaseEle

#parent, #raw_string

Instance Method Summary collapse

Methods inherited from Text

concat, #empty?, #initialize, new, new_internal, parse_cdata_content, parse_cdata_section, parse_pcdata, #pathname, #pretty_print, #strip, #to_s

Methods included from Text::Trav

#traverse_text_internal

Methods included from Leaf::Trav

#traverse_all_element, #traverse_some_element, #traverse_text_internal

Methods included from Traverse

#after, #at, #before, #bogusetag?, #children_of_type, #clean_path, #comment?, #css_path, #doc?, #doctype?, #elem?, filter, #get_subnode, #inner_html, #inner_html=, #next_node, #node_position, #nodes_at, #position, #previous_node, #procins?, #search, #swap, #text?, #to_html, #to_original_html, #traverse_element, #traverse_text, #xmldecl?, #xpath

Methods included from Leaf

#pretty_print

Methods included from Hpricot

XML, build_node, make, parse, scan

Methods inherited from BaseEle

alterable, #altered!, #html_quote, #if_output, #pathname

Constructor Details

This class inherits a constructor from Hpricot::Text

Instance Method Details

#output(out, opts = {}) ⇒ Object



148
149
150
151
152
153
# File 'lib/hpricot/tag.rb', line 148

def output(out, opts = {})
  out <<
    if_output(opts) do
      "<![CDATA[#@content]]>"
    end
end