Class: Pdf4me::OptimizeByProfile
- Inherits:
-
WrapperAction
- Object
- WrapperAction
- Pdf4me::OptimizeByProfile
- Defined in:
- lib/pdf4me/actions/optimize_by_profile.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#save_path ⇒ Object
Returns the value of attribute save_path.
Attributes inherited from WrapperAction
Instance Method Summary collapse
Methods inherited from WrapperAction
#assign_attributes, #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/optimize_by_profile.rb', line 3 def file @file end |
#profile ⇒ Object
Returns the value of attribute profile.
3 4 5 |
# File 'lib/pdf4me/actions/optimize_by_profile.rb', line 3 def profile @profile end |
#save_path ⇒ Object
Returns the value of attribute save_path.
3 4 5 |
# File 'lib/pdf4me/actions/optimize_by_profile.rb', line 3 def save_path @save_path end |
Instance Method Details
#call_api ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/pdf4me/actions/optimize_by_profile.rb', line 34 def call_api client.multipart_post( path, file: File.open(file, 'rb'), profile: profile ) do |request| download(request, save_path) end end |
#defaults ⇒ Object
18 19 20 21 22 |
# File 'lib/pdf4me/actions/optimize_by_profile.rb', line 18 def defaults { profile: 'default' } end |
#path ⇒ Object
24 25 26 |
# File 'lib/pdf4me/actions/optimize_by_profile.rb', line 24 def path '/Optimize/OptimizeByProfile' end |