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

Returns a new instance of MagickWrapper.


371
372
373
# File 'lib/carrierwave/test/matchers.rb', line 371

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

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image.


357
358
359
# File 'lib/carrierwave/test/matchers.rb', line 357

def image
  @image
end

Instance Method Details

#formatObject


367
368
369
# File 'lib/carrierwave/test/matchers.rb', line 367

def format
  image.format
end

#heightObject


363
364
365
# File 'lib/carrierwave/test/matchers.rb', line 363

def height
  image.rows
end

#widthObject


359
360
361
# File 'lib/carrierwave/test/matchers.rb', line 359

def width
  image.columns
end