Module: Hpricot::Node

Includes:
Hpricot
Included in:
Container, ETag, Leaf
Defined in:
lib/ext/hpricot/modules.rb,
lib/ext/hpricot/tag.rb

Overview

:startdoc:

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 Hpricot

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

Instance Method Details

#altered!Object



33
34
35
# File 'lib/ext/hpricot/tag.rb', line 33

def altered!
  clear_raw
end

#clear_rawObject



24
# File 'lib/ext/hpricot/tag.rb', line 24

def clear_raw; end

#html_quote(str) ⇒ Object



21
22
23
# File 'lib/ext/hpricot/tag.rb', line 21

def html_quote(str)
  "\"" + str.gsub('"', '\\"') + "\""
end

#if_output(opts) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/ext/hpricot/tag.rb', line 25

def if_output(opts)
  if opts[:preserve] and not raw_string.nil?
    raw_string
  else
    yield opts
  end
end

#inspect_tree(depth = 0) ⇒ Object



36
37
38
# File 'lib/ext/hpricot/tag.rb', line 36

def inspect_tree(depth = 0)
  %{#{" " * depth}} + self.class.name.split(/::/).last.downcase + "\n"
end

#pathnameObject



32
# File 'lib/ext/hpricot/tag.rb', line 32

def pathname; self.name end