Class: Pdf4me::MergeTwoPdfs
- Inherits:
-
WrapperAction
- Object
- WrapperAction
- Pdf4me::MergeTwoPdfs
- Defined in:
- lib/pdf4me/actions/merge_two_pdfs.rb
Instance Attribute Summary collapse
-
#file1 ⇒ Object
Returns the value of attribute file1.
-
#file2 ⇒ Object
Returns the value of attribute file2.
-
#save_path ⇒ Object
Returns the value of attribute save_path.
Attributes inherited from WrapperAction
Instance Method Summary collapse
Methods inherited from WrapperAction
#assign_attributes, #defaults, #initialize, #run, #run!
Constructor Details
This class inherits a constructor from Pdf4me::WrapperAction
Instance Attribute Details
#file1 ⇒ Object
Returns the value of attribute file1.
3 4 5 |
# File 'lib/pdf4me/actions/merge_two_pdfs.rb', line 3 def file1 @file1 end |
#file2 ⇒ Object
Returns the value of attribute file2.
3 4 5 |
# File 'lib/pdf4me/actions/merge_two_pdfs.rb', line 3 def file2 @file2 end |
#save_path ⇒ Object
Returns the value of attribute save_path.
3 4 5 |
# File 'lib/pdf4me/actions/merge_two_pdfs.rb', line 3 def save_path @save_path end |
Instance Method Details
#call_api ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/pdf4me/actions/merge_two_pdfs.rb', line 24 def call_api client.multipart_post( path, file1: File.open(file1, 'rb'), file2: File.open(file2, 'rb'), ) do |request| download(request, save_path) end end |
#path ⇒ Object
13 14 15 |
# File 'lib/pdf4me/actions/merge_two_pdfs.rb', line 13 def path '/Merge/Merge2Pdfs' end |