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

- (MagickWrapper) initialize(filename)



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

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

Instance Attribute Details

- (Object) image (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

- (Object) height



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

def height
  image.rows
end

- (Object) width



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

def width
  image.columns
end