Class: PdfEditor::TitlePage
- Inherits:
-
Object
- Object
- PdfEditor::TitlePage
- Defined in:
- lib/pdf_editor/title_page.rb
Constant Summary
Constants included from Errors
Errors::ArgumentMissingError, Errors::InvalidInputError, Errors::InvalidPDFError, Errors::PageCountError, Errors::PageOrderInvalidError, Errors::PageRangeError, Errors::ResourcesEmptyError, Errors::TitlePageTitleError
Constants included from Service
Service::InterfaceNotImplementedError, Service::MustPassBlockToAsTempfile
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
Methods included from PrawnDSL
#document, #method_missing, #respond_to_missing?, #save_to_file, #to_pdf, #update_pdf
Methods included from Service
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PdfEditor::PrawnDSL
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'lib/pdf_editor/title_page.rb', line 11 def title @title end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/pdf_editor/title_page.rb', line 17 def call unless title raise Errors::TitlePageTitleError, 'Title page requires a title to operate' end PdfEditor::Resource.new( create_tempfile {create_pdf}, title ) end |
#post_init ⇒ Object
13 14 15 |
# File 'lib/pdf_editor/title_page.rb', line 13 def post_init @title = args[:title] end |