Class: Hpricot::CData
- Inherits:
-
Basic
- Object
- Basic
- Hpricot::CData
- Includes:
- Trav, Leaf
- Defined in:
- lib/hpricot/tag.rb,
lib/hpricot/modules.rb,
lib/hpricot/modules.rb,
ext/hpricot_scan/hpricot_scan.c
Defined Under Namespace
Modules: Trav
Constant Summary
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)
- - (Object) content (also: #to_s, #to_plain_text, #inner_text)
- - (Object) content=
-
- (CData) initialize(content)
constructor
A new instance of CData.
- - (Object) output(out, opts = {})
- - (Object) raw_string
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, css, make, parse, scan, uxs, xchr, xs
Constructor Details
- (CData) initialize(content)
A new instance of CData
153 |
# File 'lib/hpricot/tag.rb', line 153 def initialize content; self.content = content end |
Instance Method Details
- (Object) content Also known as: to_s, to_plain_text, inner_text
- (Object) content=
- (Object) output(out, opts = {})
158 159 160 161 162 163 |
# File 'lib/hpricot/tag.rb', line 158 def output(out, opts = {}) out << if_output(opts) do "<![CDATA[#{content}]]>" end end |
- (Object) raw_string
157 |
# File 'lib/hpricot/tag.rb', line 157 def raw_string; "<![CDATA[#{content}]]>" end |