class Paru::PandocFilter::Target

A Target represents the target of a link or image

@!attribute url

@return [String] the target

@!attribute title

@return [String] the title of the target

Attributes

title[RW]
url[RW]

Public Class Methods

new(contents) click to toggle source

Create a new Target based on the contents

@param contents [Array]

# File lib/paru/filter/target.rb, line 34
def initialize(contents)
    @url = contents[0]
    @title = contents[1]
end

Public Instance Methods

to_ast() click to toggle source

Create an AST representation of this Target

@return [Array]

# File lib/paru/filter/target.rb, line 42
def to_ast()
    [
        @url,
        @title
    ]
end