Class: Dragonfly::ImageMagick::Generators::Plasma

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

Instance Method Summary collapse

Instance Method Details

#call(content, width, height, opts = {}) ⇒ Object



6
7
8
9
10
# File 'lib/dragonfly/image_magick/generators/plasma.rb', line 6

def call(content, width, height, opts={})
  format = extract_format(opts)
  content.generate!(:convert, "-size #{width}x#{height} plasma:fractal", format)
  content.add_meta('format' => format, 'name' => "plasma.#{format}")
end

#update_url(url_attributes, width, height, opts = {}) ⇒ Object



12
13
14
# File 'lib/dragonfly/image_magick/generators/plasma.rb', line 12

def update_url(url_attributes, width, height, opts={})
  url_attributes.name = "plasma.#{extract_format(opts)}"
end