Class: RiotCarrierwave::ImageLoader
- Inherits:
-
Object
- Object
- RiotCarrierwave::ImageLoader
- Defined in:
- lib/riot-carrierwave/wrappers.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.load_image(filename) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/riot-carrierwave/wrappers.rb', line 4 def self.load_image(filename) if defined? MiniMagick RiotCarrierwave::MiniMagickWrapper.new(filename) else unless defined? Magick begin require 'rmagick' rescue LoadError require 'RMagick' rescue LoadError puts "WARNING: Failed to require rmagick, image processing may fail!" end end RiotCarrierwave::MagickWrapper.new(filename) end end |