Module: Hadupils::Extensions::Dfs::TmpFile
- Defined in:
- lib/hadupils/extensions.rb
Class Method Summary collapse
Class Method Details
.reset_tmpfile! ⇒ Object
110 111 112 |
# File 'lib/hadupils/extensions.rb', line 110 def self.reset_tmpfile! @tmpdir_path = nil end |
.tmp_path ⇒ Object
102 103 104 |
# File 'lib/hadupils/extensions.rb', line 102 def self.tmp_path @tmp_path ||= (ENV['HADUPILS_TMP_PATH'] || '/tmp') end |
.tmp_ttl ⇒ Object
98 99 100 |
# File 'lib/hadupils/extensions.rb', line 98 def self.tmp_ttl @tmp_ttl ||= (ENV['HADUPILS_TMP_TTL'] || '1209600').to_i end |
.tmpfile_path ⇒ Object
106 107 108 |
# File 'lib/hadupils/extensions.rb', line 106 def self.tmpfile_path @tmpfile_path ||= ::File.join(tmp_path, "hadupils-tmp-#{uuid.generate(:compact)}") end |
.uuid ⇒ Object
94 95 96 |
# File 'lib/hadupils/extensions.rb', line 94 def self.uuid @uuid ||= UUID.new end |