Class: CarrierWave::Test::Matchers::MagickWrapper
- Inherits:
-
Object
- Object
- CarrierWave::Test::Matchers::MagickWrapper
- Defined in:
- lib/carrierwave/test/matchers.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize(filename) ⇒ MagickWrapper
constructor
A new instance of MagickWrapper.
- #width ⇒ Object
Constructor Details
#initialize(filename) ⇒ MagickWrapper
Returns a new instance of MagickWrapper.
141 142 143 |
# File 'lib/carrierwave/test/matchers.rb', line 141 def initialize(filename) @image = ::Magick::Image.read(filename).first end |
Instance Attribute Details
#image ⇒ Object (readonly)
Returns the value of attribute image.
132 133 134 |
# File 'lib/carrierwave/test/matchers.rb', line 132 def image @image end |
Instance Method Details
#height ⇒ Object
137 138 139 |
# File 'lib/carrierwave/test/matchers.rb', line 137 def height image.rows end |
#width ⇒ Object
133 134 135 |
# File 'lib/carrierwave/test/matchers.rb', line 133 def width image.columns end |