Class: Hpricot::BogusETag

Inherits:
ETag show all
Includes:
Trav, Leaf
Defined in:
lib/hpricot/tag.rb,
lib/hpricot/inspect.rb,
lib/hpricot/modules.rb,
lib/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, PREDEFINED, PREDEFINED_U, SELF_CLOSING_TAGS

Instance Attribute Summary

Attributes inherited from BaseEle

#parent, #raw_string

Class Method Summary collapse

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 Hpricot

XML, build, build_node, make, scan, uxs, xchr, xs

Methods inherited from ETag

#initialize

Methods inherited from BaseEle

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

Constructor Details

This class inherits a constructor from Hpricot::ETag

Class Method Details

.parse(qname, raw_string) ⇒ Object



228
229
230
231
232
# File 'lib/hpricot/parse.rb', line 228

def BogusETag.parse(qname, raw_string)
  result = self.new(qname)
  result.raw_string = raw_string
  result
end

Instance Method Details

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



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

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

#pretty_print(q) ⇒ Object



94
95
96
97
98
99
100
101
102
103
104
# File 'lib/hpricot/inspect.rb', line 94

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