Class: CarrierWave::Test::Matchers::MagickWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/carrierwave/test/matchers.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ MagickWrapper



333
334
335
# File 'lib/carrierwave/test/matchers.rb', line 333

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

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image



324
325
326
# File 'lib/carrierwave/test/matchers.rb', line 324

def image
  @image
end

Instance Method Details

#heightObject



329
330
331
# File 'lib/carrierwave/test/matchers.rb', line 329

def height
  image.rows
end

#widthObject



325
326
327
# File 'lib/carrierwave/test/matchers.rb', line 325

def width
  image.columns
end