module Dandelion::Utils

Public Instance Methods

temp(file, data) { |path| ... } click to toggle source
# File lib/dandelion/utils.rb, line 5
def temp(file, data)
  tmp = Tempfile.new(file.gsub('/', '.'))
  tmp << data
  tmp.flush
  yield(tmp.path)
  tmp.close
end