Class: Hpricot::BogusETag

Inherits:
Attr
  • Object
show all
Includes:
Trav, Leaf
Defined in:
lib/hpricot/tag.rb,
lib/hpricot/inspect.rb,
lib/hpricot/modules.rb,
lib/hpricot/modules.rb,
ext/hpricot_scan/hpricot_scan.c

Direct Known Subclasses

ETag

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

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=, #inner_text, #make, #next, #node_position, #nodes_at, #position, #preceding, #previous, #procins?, #search, #swap, #text?, #to_html, #to_original_html, #to_plain_text, #traverse_element, #traverse_text, #xmldecl?, #xpath

Methods included from Node

#altered!, #html_quote, #if_output, #inspect_tree, #pathname

Methods included from Hpricot

XML, build, css, make, parse, scan, uxs, xchr, xs

Constructor Details

#initialize(name) ⇒ BogusETag

Returns a new instance of BogusETag.



125
# File 'lib/hpricot/tag.rb', line 125

def initialize name; self.name = name end

Instance Method Details

#clear_rawObject

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



126
127
128
# File 'lib/hpricot/tag.rb', line 126

def output(out, opts = {})
  out << if_output(opts) { "" }
end

#pretty_print(q) ⇒ Object



90
91
92
93
94
95
96
97
98
99
100
# File 'lib/hpricot/inspect.rb', line 90

def pretty_print(q)
  q.group(1, '{', '}') {
    q.text self.class.name.sub(/.*::/,'').downcase
    if rs = raw_string
      q.breakable
      q.text rs
    else
      q.text "</#{name}>"
    end
  }
end

#raw_stringObject