Class: Hpricot::CData
- Defined in:
- lib/ext/hpricot/tag.rb,
lib/ext/hpricot/modules.rb,
lib/ext/hpricot/modules.rb
Defined Under Namespace
Modules: Trav
Constant Summary
Constants included from Hpricot
AttrCore, AttrEvents, AttrFocus, AttrHAlign, AttrI18n, AttrVAlign, Attrs, ElementContent, ElementExclusions, ElementInclusions, FORM_TAGS, NamedCharacters, NamedCharactersPattern, OmittedAttrName, SELF_CLOSING_TAGS
Instance Method Summary collapse
-
#initialize(content) ⇒ CData
constructor
A new instance of CData.
- #output(out, opts = {}) ⇒ Object
- #raw_string ⇒ Object
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, #following, #get_subnode, #html, #index, #inner_html=, #make, #next, #node_position, #nodes_at, #position, #preceding, #previous, #procins?, #search, #swap, #text?, #to_html, #to_original_html, #traverse_element, #traverse_text, #xmldecl?, #xpath
Methods included from Leaf
Methods included from Node
#altered!, #clear_raw, #html_quote, #if_output, #inspect_tree, #pathname
Methods included from Hpricot
XML, build, make, parse, uxs, xchr, xs
Constructor Details
#initialize(content) ⇒ CData
Returns a new instance of CData.
135 |
# File 'lib/ext/hpricot/tag.rb', line 135 def initialize content; self.content = content end |
Instance Method Details
#output(out, opts = {}) ⇒ Object
140 141 142 143 144 145 |
# File 'lib/ext/hpricot/tag.rb', line 140 def output(out, opts = {}) out << if_output(opts) do "<![CDATA[#{content}]]>" end end |
#raw_string ⇒ Object
139 |
# File 'lib/ext/hpricot/tag.rb', line 139 def raw_string; "<![CDATA[#{content}]]>" end |