Class: Tempfile

Inherits:
Object
  • Object
show all
Defined in:
lib/paperclip/iostream.rb

Direct Known Subclasses

Paperclip::Tempfile

Instance Method Summary collapse

Instance Method Details

#sizeObject



35
36
37
38
39
40
41
42
43
# File 'lib/paperclip/iostream.rb', line 35

def size
  if @tmpfile
    @tmpfile.fsync
    @tmpfile.flush
    @tmpfile.stat.size
  else
    0
  end
end