Class: Ilovepdf::Tool::Pdfjpg

Inherits:
Ilovepdf::Task show all
Defined in:
lib/ilovepdf/tool/pdfjpg.rb

Constant Summary collapse

API_PARAMS =
[:mode]
MODE_VALUES =
['pages', 'extract']

Constants inherited from Ilovepdf::Task

Ilovepdf::Task::DOWNLOAD_INFO

Constants included from Ilovepdf

VERSION

Instance Attribute Summary

Attributes inherited from Ilovepdf::Task

#ignore_errors, #ignore_password, #output_filename, #packaged_filename, #result, #task_id, #tool, #try_pdf_repair

Instance Method Summary collapse

Methods inherited from Ilovepdf::Task

#add_file, #add_file_from_url, #assign_meta_value, #blob, #delete!, #delete_file, #download, #download_info, #enable_file_encryption, #execute, #files, #status

Methods included from Ilovepdf

root

Constructor Details

#initialize(public_key, secret_key) ⇒ Pdfjpg

Returns a new instance of Pdfjpg.



8
9
10
11
# File 'lib/ilovepdf/tool/pdfjpg.rb', line 8

def initialize(public_key, secret_key)
  self.tool = :pdfjpg
  super(public_key, secret_key)
end

Instance Method Details

#modeObject



17
18
19
# File 'lib/ilovepdf/tool/pdfjpg.rb', line 17

def mode
  @mode
end

#mode=(new_val) ⇒ Object



13
14
15
16
# File 'lib/ilovepdf/tool/pdfjpg.rb', line 13

def mode=(new_val)
  raise Errors::ArgumentEnumError.new(MODE_VALUES) unless MODE_VALUES.include?(new_val)
  @mode = new_val
end