Class: Envjs::TempFile

Inherits:
Tempfile
  • Object
show all
Defined in:
lib/envjs/tempfile.rb

Instance Method Summary collapse

Constructor Details

#initialize(pattern, suffix = nil) ⇒ TempFile

Returns a new instance of TempFile.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/envjs/tempfile.rb', line 7

def initialize pattern, suffix = nil
  super(pattern)


  if suffix
    new_path = path + "." + suffix
    File.link path, new_path
    File.unlink path
    # blah ... implementation specific ...
    @data[0] = @tmpname = new_path
  end
end

Instance Method Details

#getAbsolutePathObject



20
21
22
# File 'lib/envjs/tempfile.rb', line 20

def getAbsolutePath
  path
end