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

ElementContent, ElementExclusions, ElementInclusions, NamedCharacters, NamedCharactersPattern, OmittedAttrName

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, #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 Hpricot

XML, build_node, make, scan

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



200
201
202
203
204
# File 'lib/hpricot/parse.rb', line 200

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

Instance Method Details

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



126
# 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