Class: Infoboxer::Tree::Heading

Inherits:
BaseParagraph show all
Defined in:
lib/infoboxer/tree/paragraphs.rb

Overview

Represents heading.

NB: min heading level in MediaWiki is 2, Heading level 1 (page title) is not seen in page flaw.

Instance Attribute Summary collapse

Attributes inherited from Compound

#children

Attributes inherited from Node

#params, #parent

Instance Method Summary collapse

Methods inherited from BaseParagraph

#text

Methods inherited from Compound

#index_of, #text, #to_tree

Methods inherited from Node

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

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_siblings, #_lookup_siblings, #_matches?, #has_parent?, #lookup, #lookup_children, #lookup_next_siblings, #lookup_parents, #lookup_prev_siblings, #lookup_siblings, #matches?

Constructor Details

#initialize(children, level) ⇒ Heading

Returns a new instance of Heading.



96
97
98
# File 'lib/infoboxer/tree/paragraphs.rb', line 96

def initialize(children, level)
  super(children, level: level)
end

Instance Attribute Details

#levelFixnum (readonly)

Returns lesser numbers is more important heading.

Returns:

  • (Fixnum)

    lesser numbers is more important heading



102
# File 'lib/infoboxer/tree/paragraphs.rb', line 102

def_readers :level