Method: Temp::Tempfile#initialize
- Defined in:
- lib/temp/tempfile.rb
#initialize(dir, options = {}) ⇒ Tempfile
Load a Tempfile in the specified directory. Options can be passed so that they can be accessed from the Tempfile.
10 11 12 13 14 15 16 17 18 |
# File 'lib/temp/tempfile.rb', line 10 def initialize(dir, = {}) @dir = File.(dir) @file = File.join(@dir, 'Tempfile') = @info = {} @ignore_files = [] @erb_files = [] instance_eval File.read(@file) if File.file? @file end |