Class: Paperclip::Rotator
- Inherits:
-
Thumbnail
- Object
- Thumbnail
- Paperclip::Rotator
- Defined in:
- lib/paperclip/rotator.rb
Instance Method Summary collapse
-
#initialize(file, options = {}, attachment = nil) ⇒ Rotator
constructor
A new instance of Rotator.
- #rotate_command ⇒ Object
- #transformation_command ⇒ Object
Constructor Details
#initialize(file, options = {}, attachment = nil) ⇒ Rotator
Returns a new instance of Rotator.
3 4 5 6 |
# File 'lib/paperclip/rotator.rb', line 3 def initialize(file, = {}, = nil) [:auto_orient] = true super end |
Instance Method Details
#rotate_command ⇒ Object
16 17 18 19 20 21 |
# File 'lib/paperclip/rotator.rb', line 16 def rotate_command target = @attachment.instance if target.rotate.present? " -rotate #{target.rotate}" end end |
#transformation_command ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/paperclip/rotator.rb', line 8 def transformation_command if rotate_command "#{rotate_command} -strip #{super.join(' ')}" else super end end |