class Teaas::VerticalRoller

Public Class Methods

roll(img, options) click to toggle source
# File lib/teaas/vertical_roller.rb, line 3
def self.roll(img, options)
  if options[:reverse]
    img.roll(0, options[:img_height] * ((options[:total_frames] - options[:frame].to_f) / options[:total_frames]))
  else
    img.roll(0, options[:img_height] * (options[:frame].to_f / options[:total_frames]))
  end
end