class Teaas::HorizontalRoller
Public Class Methods
roll(img, options)
click to toggle source
# File lib/teaas/horizontal_roller.rb, line 3 def self.roll(img, options) if options[:reverse] img.roll(options[:img_width] * ((options[:total_frames] - options[:frame].to_f) / options[:total_frames]), 0) else img.roll(options[:img_width] * (options[:frame].to_f / options[:total_frames]), 0) end end