Class: Tempfile

Inherits:
Object show all
Defined in:
lib/dragonfly/core_ext/tempfile.rb

Instance Method Summary collapse

Instance Method Details

#sizeObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/dragonfly/core_ext/tempfile.rb', line 8

def size
  if @tmpfile
    @tmpfile.flush
    @tmpfile.stat.size
  elsif @tmpname
    File.size(@tmpname)
  else
    0
  end
end