Method: IOStream#to_tempfile

Defined in:
lib/paperclip/iostream.rb

#to_tempfileObject

Returns a Tempfile containing the contents of the readable object.



6
7
8
9
10
# File 'lib/paperclip/iostream.rb', line 6

def to_tempfile
  tempfile = Tempfile.new("stream")
  tempfile.binmode
  self.stream_to(tempfile)
end