Class: Pdf4me::ExtractPages
- Inherits:
-
WrapperAction
- Object
- WrapperAction
- Pdf4me::ExtractPages
- Defined in:
- lib/pdf4me/actions/extract_pages.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#pages ⇒ Object
Returns the value of attribute pages.
-
#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
#file ⇒ Object
Returns the value of attribute file.
3 4 5 |
# File 'lib/pdf4me/actions/extract_pages.rb', line 3 def file @file end |
#pages ⇒ Object
Returns the value of attribute pages.
3 4 5 |
# File 'lib/pdf4me/actions/extract_pages.rb', line 3 def pages @pages end |
#save_path ⇒ Object
Returns the value of attribute save_path.
3 4 5 |
# File 'lib/pdf4me/actions/extract_pages.rb', line 3 def save_path @save_path end |
Instance Method Details
#call_api ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/pdf4me/actions/extract_pages.rb', line 29 def call_api client.multipart_post( path, file: File.open(file, 'rb'), pageNrs: pages.join(',') ) do |request| download(request, save_path) end end |
#path ⇒ Object
19 20 21 |
# File 'lib/pdf4me/actions/extract_pages.rb', line 19 def path '/Extract/ExtractPages' end |