Class: PdfEditor::Bundle

Inherits:
Object
  • Object
show all
Includes:
Service
Defined in:
lib/pdf_editor/bundle.rb

Constant Summary

Constants included from Service

Service::InterfaceNotImplementedError, Service::MustPassBlockToAsTempfile

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Service

included, #initialize

Instance Attribute Details

#resourcesObject (readonly)

Returns the value of attribute resources.



11
12
13
# File 'lib/pdf_editor/bundle.rb', line 11

def resources
  @resources
end

#titleObject (readonly)

Returns the value of attribute title.



11
12
13
# File 'lib/pdf_editor/bundle.rb', line 11

def title
  @title
end

#with_title_pagesObject (readonly)

Returns the value of attribute with_title_pages.



11
12
13
# File 'lib/pdf_editor/bundle.rb', line 11

def with_title_pages
  @with_title_pages
end

#with_tocObject (readonly)

Returns the value of attribute with_toc.



11
12
13
# File 'lib/pdf_editor/bundle.rb', line 11

def with_toc
  @with_toc
end

Instance Method Details

#callObject



23
24
25
26
27
# File 'lib/pdf_editor/bundle.rb', line 23

def call
  create_title_pages
  create_table_of_contents
  bundle_documents
end

#post_initObject



13
14
15
16
17
18
19
20
21
# File 'lib/pdf_editor/bundle.rb', line 13

def post_init
  @resources         = args.fetch(:resources, [])
  @ready_for_toc     = []
  @table_of_contents = nil

  @title             = args.fetch(:title, '')
  @with_toc          = args.fetch(:with_toc, true)
  @with_title_pages  = args.fetch(:with_title_pages, true)
end