Class: RiotCarrierwave::MiniMagickWrapper
- Inherits:
-
Object
- Object
- RiotCarrierwave::MiniMagickWrapper
- Defined in:
- lib/riot-carrierwave/wrappers.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize(filename) ⇒ MiniMagickWrapper
constructor
A new instance of MiniMagickWrapper.
- #width ⇒ Object
Constructor Details
#initialize(filename) ⇒ MiniMagickWrapper
Returns a new instance of MiniMagickWrapper.
40 41 42 |
# File 'lib/riot-carrierwave/wrappers.rb', line 40 def initialize(filename) @image = ::MiniMagick::Image.from_file(filename) end |
Instance Attribute Details
#image ⇒ Object (readonly)
Returns the value of attribute image.
34 35 36 |
# File 'lib/riot-carrierwave/wrappers.rb', line 34 def image @image end |
Instance Method Details
#height ⇒ Object
38 |
# File 'lib/riot-carrierwave/wrappers.rb', line 38 def height; image[:height]; end |
#width ⇒ Object
36 |
# File 'lib/riot-carrierwave/wrappers.rb', line 36 def width; image[:width]; end |