Class: Hpricot::ETag
- Includes:
- Tag
- Defined in:
- lib/hpricot/tag.rb,
lib/hpricot/inspect.rb,
lib/hpricot/modules.rb
Direct Known Subclasses
Constant Summary
Constants included from Hpricot
ElementContent, ElementExclusions, ElementInclusions, NamedCharacters, NamedCharactersPattern, OmittedAttrName
Instance Attribute Summary
Attributes inherited from BaseEle
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(qualified_name) ⇒ ETag
constructor
A new instance of ETag.
- #output(out, opts = {}) ⇒ Object
- #pretty_print(q) ⇒ Object
Methods included from Hpricot
XML, build_node, make, scan
Methods inherited from BaseEle
alterable, #altered!, #html_quote, #if_output, #pathname
Constructor Details
#initialize(qualified_name) ⇒ ETag
Returns a new instance of ETag.
113 114 115 |
# File 'lib/hpricot/tag.rb', line 113 def initialize(qualified_name) @name = qualified_name end |
Class Method Details
.parse(qname, raw_string) ⇒ Object
194 195 196 197 198 |
# File 'lib/hpricot/parse.rb', line 194 def ETag.parse(qname, raw_string) result = self.new(qname) result.raw_string = raw_string result end |
Instance Method Details
#output(out, opts = {}) ⇒ Object
117 118 119 120 121 122 |
# File 'lib/hpricot/tag.rb', line 117 def output(out, opts = {}) out << if_output(opts) do "</#{@name}>" end end |
#pretty_print(q) ⇒ Object
75 76 77 78 79 |
# File 'lib/hpricot/inspect.rb', line 75 def pretty_print(q) q.group(1, '</', '>') { q.text @name } end |