Class: Infoboxer::Tree::HTMLOpeningTag

Inherits:
Node
  • Object
show all
Includes:
HTMLTagCommons
Defined in:
lib/infoboxer/tree/html.rb

Overview

Represents orphan opening HTML tag.

NB: Infoboxer not tries to parse entire structure of HTML-heavy MediaWiki articles. So, if you have <div> at line 150 and closing </div> at line 875, there would be orphane HTMLOpeningTag and HTMLClosingTag. It is not always convenient, but reasonable enough.

Constant Summary

Constants included from HTMLTagCommons

Infoboxer::Tree::HTMLTagCommons::BLOCK_TAGS

Instance Attribute Summary collapse

Attributes inherited from Node

#params, #parent

Instance Method Summary collapse

Methods included from HTMLTagCommons

#text

Methods inherited from Node

#==, #children, coder, def_readers, #first?, #index, #inspect, #next_siblings, #prev_siblings, #siblings, #text, #text_, #to_s, #to_tree

Methods included from Navigation::Wikipath

#wikipath

Methods included from Navigation::Sections::Node

#in_sections

Methods included from Navigation::Shortcuts::Node

#bold?, #categories, #external_links, #heading?, #headings, #images, #infobox, #infoboxes, #italic?, #lists, #paragraphs, #tables, #templates, #wikilinks

Methods included from Navigation::Lookup::Node

#_lookup, #_lookup_children, #_lookup_next_siblings, #_lookup_parents, #_lookup_prev_sibling, #_lookup_prev_siblings, #_lookup_siblings, #_matches?, #lookup, #lookup_children, #lookup_next_siblings, #lookup_parents, #lookup_prev_sibling, #lookup_prev_siblings, #lookup_siblings, #matches?, #parent?

Constructor Details

#initialize(tag, attrs) ⇒ HTMLOpeningTag

Returns a new instance of HTMLOpeningTag.



47
48
49
50
# File 'lib/infoboxer/tree/html.rb', line 47

def initialize(tag, attrs)
  super(**attrs)
  @tag = tag
end

Instance Attribute Details

#tagObject (readonly)

Returns the value of attribute tag.



52
53
54
# File 'lib/infoboxer/tree/html.rb', line 52

def tag
  @tag
end