# File lib/dragonfly/temp_object.rb, line 87 def tempfile raise Closed, "can't read from tempfile as TempObject has been closed" if closed? @tempfile ||= begin case when @data @tempfile = Utils.new_tempfile(ext, @data) when @pathname @tempfile = copy_to_tempfile(@pathname.expand_path) end @tempfile end end