instance method
capture
Ruby on Rails 7.2.3
Since v5.2.8.1 PrivateSignature
capture(*argv, to:)
No documentation comment.
Parameters
-
argvrest -
tokeyreq
Source
# File activestorage/lib/active_storage/previewer.rb, line 78
def capture(*argv, to:)
to.binmode
open_tempfile do |err|
IO.popen(argv, err: err) { |out| IO.copy_stream(out, to) }
err.rewind
unless $?.success?
raise PreviewError, "#{argv.first} failed (status #{$?.exitstatus}): #{err.read.to_s.chomp}"
end
end
to.rewind
end
Defined in activestorage/lib/active_storage/previewer.rb line 78
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Previewer