Class: RiotCarrierwave::MagickWrapper

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) ⇒ MagickWrapper

Returns a new instance of MagickWrapper.



28
29
30
# File 'lib/riot-carrierwave/wrappers.rb', line 28

def initialize(filename)
  @image = ::Magick::Image.read(filename).first
end

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image.



23
24
25
# File 'lib/riot-carrierwave/wrappers.rb', line 23

def image
  @image
end

Instance Method Details

#heightObject



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

def height; image.rows; end

#widthObject



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

def width; image.columns; end