Class: MiqTempfile
- Inherits:
-
Tempfile
- Object
- Tempfile
- MiqTempfile
- 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
-
#initialize(basename, *options) ⇒ MiqTempfile
constructor
A new instance of MiqTempfile.
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, *) if File.directory?(MIQ_TMP_DIR) super(Tempfile.new(basename, MIQ_TMP_DIR, *)) else super(Tempfile.new(basename, *)) end end |