Module: Dandelion::Utils
- Included in:
- Adapter::FTP, Adapter::FTPS, Adapter::SFTP
- Defined in:
- lib/dandelion/utils.rb
Instance Method Summary collapse
Instance Method Details
#temp(file, data) {|tmp.path| ... } ⇒ Object
5 6 7 8 9 10 11 |
# 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 |