Method: Files.create
- Defined in:
- lib/files.rb
.create(options = default_options, &block) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/files.rb', line 15 def self.create = , &block require 'tmpdir' require 'fileutils' name = [:name] path = File.join(Dir::tmpdir, "#{name}_#{Time.now.to_i}_#{rand(1000)}") Files.new path, block, end |