Class: Ungulate::RmagickVersionCreator
- Inherits:
-
Object
- Object
- Ungulate::RmagickVersionCreator
- Defined in:
- lib/ungulate/rmagick_version_creator.rb
Instance Method Summary collapse
- #create(blob, instructions) ⇒ Object
-
#initialize(options = {}) ⇒ RmagickVersionCreator
constructor
A new instance of RmagickVersionCreator.
Constructor Details
#initialize(options = {}) ⇒ RmagickVersionCreator
Returns a new instance of RmagickVersionCreator.
7 8 9 10 |
# File 'lib/ungulate/rmagick_version_creator.rb', line 7 def initialize( = {}) @logger = [:logger] || ::Logger.new($stdout) @http = [:http] end |
Instance Method Details
#create(blob, instructions) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/ungulate/rmagick_version_creator.rb', line 12 def create(blob, instructions) image = processed_image(magick_image_from_blob(blob), instructions) { :blob => image.to_blob, :content_type => MIME::Types.type_for(image.format).to_s } end |