Class: HTree::BogusETag
- Inherits:
-
Object
- Object
- HTree::BogusETag
- Defined in:
- lib/htree/loc.rb,
lib/htree/leaf.rb,
lib/htree/rexml.rb,
lib/htree/output.rb,
lib/htree/inspect.rb,
lib/htree/modules.rb,
lib/htree/modules.rb,
lib/htree/modules.rb,
lib/htree/equality.rb
Defined Under Namespace
Constant Summary
Constants included from HTree
DefaultContext, ElementContent, ElementExclusions, ElementInclusions, EmptyBindingObject, HTMLContext, NamedCharacters, NamedCharactersPattern, OmittedAttrName
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(qualified_name) ⇒ BogusETag
constructor
A new instance of BogusETag.
- #make_exact_equal_object ⇒ Object (also: #usual_equal_object)
- #node_test_string ⇒ Object
-
#output(out, context) ⇒ Object
don’t output anything.
- #pretty_print(q) ⇒ Object
- #to_rexml_internal(parent, context) ⇒ Object
Methods included from Leaf::Trav
#traverse_all_element, #traverse_some_element, #traverse_text_internal
Methods included from Traverse
#bogusetag?, #comment?, #doc?, #doctype?, #elem?, #get_subnode, #procins?, #text?, #traverse_text, #xmldecl?
Methods included from Leaf
#extract_text, #init_raw_string, #raw_string=, #raw_string_internal
Methods included from Node
#display_html, #display_xml, #eliminate_raw_string, #extract_text, #generate_xml_output_code, #make_loc, #raw_string, #subst, #subst_internal, #to_node, #to_rexml
Methods included from HTree
#==, build_node, #check_equality, compile_template, #exact_equal?, #exact_equal_object, expand_template, fix_element, fix_structure_list, frozen_string, #hash, #make_usual_equal_object, parse_as, parse_pairs, parse_xml, scan, with_frozen_string_hash
Constructor Details
Class Method Details
.parse(raw_string, is_xml, is_html) ⇒ Object
292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/htree/parse.rb', line 292 def BogusETag.parse(raw_string, is_xml, is_html) unless /\A#{Pat::EndTag_C}\z/o =~ raw_string raise HTree::Error, "cannot recognize as end tag: #{raw_string.inspect}" end qname = $1 qname = qname.downcase if !is_xml && is_html result = self.new(qname) result.raw_string = raw_string result end |
Instance Method Details
#make_exact_equal_object ⇒ Object Also known as: usual_equal_object
203 204 205 |
# File 'lib/htree/equality.rb', line 203 def make_exact_equal_object [@etag] end |
#node_test_string ⇒ Object
93 |
# File 'lib/htree/loc.rb', line 93 def node_test_string() 'bogus-etag()' end |
#output(out, context) ⇒ Object
don’t output anything.
151 152 |
# File 'lib/htree/output.rb', line 151 def output(out, context) end |
#pretty_print(q) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/htree/inspect.rb', line 95 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 "</#{@qualified_name}>" end } end |
#to_rexml_internal(parent, context) ⇒ Object
125 126 127 |
# File 'lib/htree/rexml.rb', line 125 def to_rexml_internal(parent, context) nil end |