Currently I am working on a ROR code which uses rails paperclip gem.
My requirement is, to process images as per its file extension.
Here's how I solved this for a document management system that needed transcoding for video, resizing for images, and nothing for every other file type (zip, powerpoint, etc.).
def audio? ['audio/mpeg', 'audio/x-wav', 'audio/x-aiff', 'audio/ogg'].include?(blob_content_type.to_s.downcase)
In case you wondered...
Walter