Class: RiotCarrierwave::MiniMagickWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/riot-carrierwave/wrappers.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ MiniMagickWrapper

Returns a new instance of MiniMagickWrapper.



40
41
42
# File 'lib/riot-carrierwave/wrappers.rb', line 40

def initialize(filename)
  @image = ::MiniMagick::Image.from_file(filename)
end

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image.



34
35
36
# File 'lib/riot-carrierwave/wrappers.rb', line 34

def image
  @image
end

Instance Method Details

#heightObject



38
# File 'lib/riot-carrierwave/wrappers.rb', line 38

def height; image[:height]; end

#widthObject



36
# File 'lib/riot-carrierwave/wrappers.rb', line 36

def width; image[:width]; end