class Paru::PandocFilter::Link

A Link node has an attribute object, an Inline description and a target

@!attribute attr

@return [Attr]

@!attribute target

@return [Target]

Attributes

attr[RW]
target[RW]

Public Class Methods

new(contents) click to toggle source

Create a new Link node with contents

@param contents [Array] an array with attributes, description,

and target information
Calls superclass method Paru::PandocFilter::Inline::new
# File lib/paru/filter/link.rb, line 40
def initialize(contents)
    @attr = Attr.new contents[0]
    super contents[1]
    @target = Target.new contents[2]
end

Public Instance Methods

ast_contents() click to toggle source

Create an AST representation of this Link node

Calls superclass method
# File lib/paru/filter/link.rb, line 47
def ast_contents
    [
        @attr.to_ast,
        super,
        @target.to_ast
    ]
end