File: //usr/local/rvm/gems/ruby-2.7.4/doc/activestorage-6.1.4.1/ri/ActiveStorage/Previewer/draw-i.ri
U:RDoc::AnyMethod[iI" draw:ETI""ActiveStorage::Previewer#draw;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"_Executes a system command, capturing its binary output in a tempfile. Yields the tempfile.;To:RDoc::Markup::BlankLine o;
; [I"_Use this method to shell out to a system library (e.g. muPDF or FFmpeg) for preview image ;TI"]generation. The resulting tempfile can be used as the +:io+ value in an attachable Hash:;T@o:RDoc::Markup::Verbatim; [I"def preview
;TI", download_blob_to_tempfile do |input|
;TI"S draw "my-drawing-command", input.path, "--format", "png", "-" do |output|
;TI"^ yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png"
;TI"
end
;TI" end
;TI" end
;T:@format0o;
; [I"HThe output tempfile is opened in the directory returned by #tmpdir.;T:
@fileI"$lib/active_storage/previewer.rb;T:0@omit_headings_from_table_of_contents_below00I" file;T[ I"(*argv);T@FI"Previewer;TcRDoc::NormalClass00