Class: Tempfile

Inherits:
StringIO
  • Object
show all
Defined in:
lib/homura_vendor_tempfile.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTempfile

Returns a new instance of Tempfile.



6
7
8
# File 'lib/homura_vendor_tempfile.rb', line 6

def initialize(*)
  super('')
end

Class Method Details

.openObject

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/homura_vendor_tempfile.rb', line 10

def self.open(*)
  raise NotImplementedError, 'Tempfile is stubbed in homura (Workers have no writable FS)'
end

Instance Method Details

#close!Object



26
27
28
# File 'lib/homura_vendor_tempfile.rb', line 26

def close!
  close
end

#deleteObject



22
23
24
# File 'lib/homura_vendor_tempfile.rb', line 22

def delete
  self
end

#pathObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/homura_vendor_tempfile.rb', line 14

def path
  raise NotImplementedError, 'Tempfile#path stubbed (no FS)'
end


18
19
20
# File 'lib/homura_vendor_tempfile.rb', line 18

def unlink
  self
end