Class: MiqTempfile

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

Constant Summary collapse

MIQ_TMP_DIR =

TODO: share this definition with appliance console code.

'/var/www/miq_tmp'.freeze

Instance Method Summary collapse

Constructor Details

#initialize(basename, *options) ⇒ MiqTempfile

Returns a new instance of MiqTempfile.



8
9
10
11
12
13
14
# File 'lib/miq_tempfile.rb', line 8

def initialize(basename, *options)
  if File.directory?(MIQ_TMP_DIR)
    super(Tempfile.new(basename, MIQ_TMP_DIR, *options))
  else
    super(Tempfile.new(basename, *options))
  end
end