class ImageProcessing::Pipeline
def create_tempfile
Creates a new tempfile for the destination file, yields it, and refreshes
def create_tempfile tempfile = Tempfile.new(["image_processing", ".#{destination_format}"], binmode: true) yield tempfile tempfile.open tempfile rescue tempfile.close! if tempfile raise end