Class: Hpricot::Comment
- Defined in:
- lib/hpricot/tag.rb,
lib/hpricot/modules.rb,
lib/hpricot/modules.rb
Defined Under Namespace
Modules: Trav
Constant Summary
Constants included from Hpricot
ElementContent, ElementExclusions, ElementInclusions, NamedCharacters, NamedCharactersPattern, OmittedAttrName
Instance Attribute Summary
Attributes inherited from BaseEle
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content) ⇒ Comment
constructor
A new instance of Comment.
- #output(out, opts = {}) ⇒ Object
- #pathname ⇒ 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, #get_subnode, #inner_html, #inner_html=, #inner_text, #next_node, #node_position, #nodes_at, #position, #previous_node, #procins?, #search, #swap, #text?, #to_html, #to_original_html, #to_plain_text, #traverse_element, #traverse_text, #xmldecl?, #xpath
Methods included from Leaf
Methods included from Hpricot
XML, build_node, make, scan
Methods inherited from BaseEle
alterable, #altered!, #html_quote, #if_output
Constructor Details
#initialize(content) ⇒ Comment
Returns a new instance of Comment.
206 207 208 |
# File 'lib/hpricot/tag.rb', line 206 def initialize(content) @content = content end |
Class Method Details
Instance Method Details
#output(out, opts = {}) ⇒ Object
211 212 213 214 215 216 |
# File 'lib/hpricot/tag.rb', line 211 def output(out, opts = {}) out << if_output(opts) do "<!--#{@content}-->" end end |
#pathname ⇒ Object
209 |
# File 'lib/hpricot/tag.rb', line 209 def pathname; "comment()" end |