How would you check if a file is an image? I\'m thinking you could use an method like so:
def image?(file) file.to_s.include?(\".gif\") or file.to_s.includ
I would use the ruby-filemagic gem which is a Ruby binding for libmagic.