Hi, I would like to know how I can create a temporary file (png) in ruby, because tempfile only gets a random file name, but it does not have an extension file.
check documentation
# Use the Array form to enforce an extension in the filename: file = Tempfile.new(['hello', '.jpg']) file.path # => something like: "/tmp/foo2843-8392-92849382--0.jpg"
Source: https://habr.com/ru/post/1772216/More articles:What does “getting the right level of abstraction” mean? - oopPopUpExtender in ImageButton inside GridView problem - asp.netFor REST service, is api.domain.com safer than domain.com/api? - javascripthash.delete_if {| key valueXHR does not work because "Origin is not allowed Access-Control-Allow-Origin" - jqueryJQuery: как написать функцию плагина, которая примет имя функции как строку и запустит ее? - functionIs there a good library for embedding the command line in a scala (or java) application - javaЕсть ли лучший способ найти самого низкого общего предка? - cLinux awk team - awkRake breaking pages into multiple tables - paginationAll Articles