Flowdock
method

capture

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Previewer
capture(*argv, to:) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activestorage/lib/active_storage/previewer.rb, line 71
      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
Register or log in to add new notes.