Class: Dragonfly::ImageMagick::Generators::Convert

Inherits:
Object
  • Object
show all
Defined in:
lib/dragonfly/image_magick/generators/convert.rb

Instance Method Summary collapse

Instance Method Details

#call(content, args, format) ⇒ Object


6
7
8
9
10
11
12
13
# File 'lib/dragonfly/image_magick/generators/convert.rb', line 6

def call(content, args, format)
  format = format.to_s
  convert_command = content.env[:convert_command] || 'convert'
  content.shell_generate :ext => format do |path|
    "#{convert_command} #{args} #{path}"
  end
  content.add_meta('format' => format)
end