Class: VivlioStarter::CLI::Build::PdfMerger::Segment
- Inherits:
-
Data
- Object
- Data
- VivlioStarter::CLI::Build::PdfMerger::Segment
- Defined in:
- lib/vivlio_starter/cli/build/pdf_merger.rb
Overview
結合順に並ぶ 1 区間。qpdf の --pages へ「ファイル+ページ範囲」を渡す単位で、
従来の「ファイルの列」は range が全ページの特別な場合にすぎない。
role を持たせているのは、奥付前の白紙判定とアウトライン基点の算出を
パスの綴りに依存させないため。前付・奥付が本文 PDF に相乗りすると
3 区間すべてが同じ _sections.pdf を指し、ファイル名では区別できなくなる。
Instance Attribute Summary collapse
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#range ⇒ Object
readonly
qpdf のページ範囲('1-z' でファイル全体).
Instance Method Summary collapse
-
#role(value) ⇒ Object
:cover_front / :front_matter / :body / :blank / :colophon / :cover_back.
Instance Attribute Details
#pages ⇒ Object (readonly)
Returns the value of attribute pages
20 21 22 |
# File 'lib/vivlio_starter/cli/build/pdf_merger.rb', line 20 def pages @pages end |
#path ⇒ Object (readonly)
Returns the value of attribute path
20 21 22 |
# File 'lib/vivlio_starter/cli/build/pdf_merger.rb', line 20 def path @path end |
#range ⇒ Object (readonly)
qpdf のページ範囲('1-z' でファイル全体)
20 |
# File 'lib/vivlio_starter/cli/build/pdf_merger.rb', line 20 Segment = Data.define(:role, :path, :range, :pages) |
Instance Method Details
#role=(value) ⇒ Object
:cover_front / :front_matter / :body / :blank / :colophon / :cover_back
20 |
# File 'lib/vivlio_starter/cli/build/pdf_merger.rb', line 20 Segment = Data.define(:role, :path, :range, :pages) |