class Paru::PandocFilter::Header

A Header node has a level, an attribute object and the contents of the header as a list on Inline nodes.

@!attribute level

@return [Integer]

@!attribute attr

@return [Attr]

Attributes

attr[RW]
level[RW]

Public Class Methods

new(contents) click to toggle source

Create a new Header node

@param contents [Array] an array with the level, attribute, and

the header contents
Calls superclass method
# File lib/paru/filter/header.rb, line 42
def initialize(contents)
    @level = contents[0]
    @attr = Attr.new contents[1]
    super contents[2], true
end

Public Instance Methods

ast_contents() click to toggle source

Create an AST representation of this Header node

Calls superclass method
# File lib/paru/filter/header.rb, line 49
def ast_contents()
    [
        @level,
        @attr.to_ast,
        super
    ]
end
has_inline?() click to toggle source

Has this Header node inline contents?

@return [Boolean] true

# File lib/paru/filter/header.rb, line 60
def has_inline?
    true
end