Class: Teaas::HorizontalRoller
- Inherits:
-
Object
- Object
- Teaas::HorizontalRoller
- Defined in:
- lib/teaas/horizontal_roller.rb
Class Method Summary collapse
Class Method Details
.roll(img, options) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/teaas/horizontal_roller.rb', line 3 def self.roll(img, ) if [:reverse] img.roll([:img_width] * (([:total_frames] - [:frame].to_f) / [:total_frames]), 0) else img.roll([:img_width] * ([:frame].to_f / [:total_frames]), 0) end end |