class Paru::PandocFilter::Figure

A Figure node consisting of an attribute object, a caption, and a list of Block nodes.

Attributes

attr[RW]

A Figure node has an attribute object

@!attribute attr

@return [Attr]

@!attribute caption

@return Caption
caption[RW]

A Figure node has an attribute object

@!attribute attr

@return [Attr]

@!attribute caption

@return Caption

Public Class Methods

new(contents) click to toggle source

Create a new Figure node based on the contents

@param contents [Array]

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

Public Instance Methods

ast_contents() click to toggle source

Create an AST representation of this Figure node.

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

Has this Figure node Blocks as children?

@return [Boolean] true

# File lib/paru/filter/figure.rb, line 60
def has_block?
    true
end