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)

Returns a new instance of MagickWrapper



306
307
308
# File 'lib/carrierwave/test/matchers.rb', line 306

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

Instance Attribute Details

- (Object) image (readonly)

Returns the value of attribute image



297
298
299
# File 'lib/carrierwave/test/matchers.rb', line 297

def image
  @image
end

Instance Method Details

- (Object) height



302
303
304
# File 'lib/carrierwave/test/matchers.rb', line 302

def height
  image.rows
end

- (Object) width



298
299
300
# File 'lib/carrierwave/test/matchers.rb', line 298

def width
  image.columns
end