Class: Dragonfly::ImageMagick::Generators::Plasma
- Defined in:
- lib/dragonfly/image_magick/generators/plasma.rb
Instance Method Summary collapse
- #call(content, width, height, opts = {}) ⇒ Object
- #update_url(url_attributes, width, height, opts = {}) ⇒ Object
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.('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 |