Class: Paperclip::Ghostscript

Inherits:
Processor
  • Object
show all
Defined in:
lib/paperclip/ghostscript.rb

Constant Summary collapse

VERSION =
"0.1.0"
COMMAND =
"gs"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, options = {}, attachment = nil) ⇒ Ghostscript

Returns a new instance of Ghostscript.



12
13
14
15
16
17
18
19
# File 'lib/paperclip/ghostscript.rb', line 12

def initialize file, options = {}, attachment = nil
  super
  @file           = file
  @format         = options[:format]

  @current_format = File.extname(@file.path)
  @basename       = File.basename(@file.path, @current_format)
end

Instance Attribute Details

#convert_optionsObject

Returns the value of attribute convert_options.



10
11
12
# File 'lib/paperclip/ghostscript.rb', line 10

def convert_options
  @convert_options
end

#current_geometryObject

Returns the value of attribute current_geometry.



10
11
12
# File 'lib/paperclip/ghostscript.rb', line 10

def current_geometry
  @current_geometry
end

#formatObject

Returns the value of attribute format.



10
11
12
# File 'lib/paperclip/ghostscript.rb', line 10

def format
  @format
end

#source_file_optionsObject

Returns the value of attribute source_file_options.



10
11
12
# File 'lib/paperclip/ghostscript.rb', line 10

def source_file_options
  @source_file_options
end

#target_geometryObject

Returns the value of attribute target_geometry.



10
11
12
# File 'lib/paperclip/ghostscript.rb', line 10

def target_geometry
  @target_geometry
end

#whinyObject

Returns the value of attribute whiny.



10
11
12
# File 'lib/paperclip/ghostscript.rb', line 10

def whiny
  @whiny
end

Instance Method Details

#makeObject



21
22
23
24
# File 'lib/paperclip/ghostscript.rb', line 21

def make
  handle_make { process! }
  destination_file
end