Class: PdfEditor::Merge
- Inherits:
-
Object
- Object
- PdfEditor::Merge
- Defined in:
- lib/pdf_editor/merge.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
-
#merged_name ⇒ Object
readonly
Returns the value of attribute merged_name.
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
Instance Method Summary collapse
Methods included from PdfRunner
Methods included from Service
Instance Attribute Details
#merged_name ⇒ Object (readonly)
Returns the value of attribute merged_name.
12 13 14 |
# File 'lib/pdf_editor/merge.rb', line 12 def merged_name @merged_name end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
12 13 14 |
# File 'lib/pdf_editor/merge.rb', line 12 def resources @resources end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/pdf_editor/merge.rb', line 19 def call if resources.empty? raise Errors::ResourcesEmptyError, 'There must be at least one resource to merge' end PdfEditor::Resource.new( create_tempfile {run_command}, merged_name ) end |
#post_init ⇒ Object
14 15 16 17 |
# File 'lib/pdf_editor/merge.rb', line 14 def post_init @resources = args.fetch(:resources, []) @merged_name = args.fetch(:merged_name, nil) end |