Public Instance methods
with_file(io)
[show source]
# File lib/shrine/plugins/tempfile.rb 8 def with_file(io) 9 if io.is_a?(UploadedFile) && io.opened? 10 # open a new file descriptor for thread safety 11 File.open(io.tempfile.path, binmode: true) do |file| 12 yield file 13 end 14 else 15 super 16 end 17 end