class Jpdfunite::Outline
Attributes
submarks[R]
title[R]
Public Class Methods
new(title = "")
click to toggle source
# File lib/jpdfunite.rb, line 37 def initialize title = "" @title = title @submarks = [] end
Public Instance Methods
add_mark(element)
click to toggle source
# File lib/jpdfunite.rb, line 42 def add_mark(element) @submarks << element end
pages()
click to toggle source
# File lib/jpdfunite.rb, line 46 def pages @submarks.map(&:pages).reduce(0, :+) end
path()
click to toggle source
# File lib/jpdfunite.rb, line 60 def path @submarks.map(&:path).join(" ") end
pdfmarks(page = 1, tabs = -1)
click to toggle source
# File lib/jpdfunite.rb, line 50 def pdfmarks(page = 1, tabs = -1) output = [own_mark(page, tabs)] tabs += 1 @submarks.each do |element| output << element.pdfmarks(page, tabs) page += element.pages end output.reject(&:empty?).join("\n") end
Private Instance Methods
own_mark(page, tabs)
click to toggle source
# File lib/jpdfunite.rb, line 66 def own_mark(page, tabs) "" end