Module: Hpricot::Node
Overview
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
build, scan, uxs, xchr, xs
Instance Method Details
#altered! ⇒ Object
37
38
39
|
# File 'lib/hpricot/tag.rb', line 37
def altered!
clear_raw
end
|
#clear_raw ⇒ Object
28
|
# File 'lib/hpricot/tag.rb', line 28
def clear_raw; end
|
#html_quote(str) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/hpricot/tag.rb', line 21
def html_quote(str)
"\"" + str.gsub('"', '"') + "\""
end
|
#if_output(opts) ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/hpricot/tag.rb', line 29
def if_output(opts)
if opts[:preserve] and not raw_string.nil?
raw_string
else
yield opts
end
end
|
#inspect_tree(depth = 0) ⇒ Object
40
41
42
|
# File 'lib/hpricot/tag.rb', line 40
def inspect_tree(depth = 0)
%{#{" " * depth}} + self.class.name.split(/::/).last.downcase + "\n"
end
|
#pathname ⇒ Object
36
|
# File 'lib/hpricot/tag.rb', line 36
def pathname; self.name end
|