Module: Hadupils::Extensions::Dfs::TmpFile
- Defined in:
- lib/hadupils/extensions.rb
Class Method Summary collapse
Class Method Details
.reset_tmpfile! ⇒ Object
100 101 102 |
# File 'lib/hadupils/extensions.rb', line 100 def self.reset_tmpfile! @tmpdir_path = nil end |
.tmp_path ⇒ Object
92 93 94 |
# File 'lib/hadupils/extensions.rb', line 92 def self.tmp_path @tmp_path ||= (ENV['HADUPILS_TMP_PATH'] || '/tmp') end |
.tmp_ttl ⇒ Object
88 89 90 |
# File 'lib/hadupils/extensions.rb', line 88 def self.tmp_ttl @tmp_ttl ||= (ENV['HADUPILS_TMP_TTL'] || '86400').to_i end |
.tmpfile_path ⇒ Object
96 97 98 |
# File 'lib/hadupils/extensions.rb', line 96 def self.tmpfile_path @tmpfile_path ||= ::File.join(tmp_path, "hadupils-tmp-#{uuid.generate(:compact)}") end |
.uuid ⇒ Object
84 85 86 |
# File 'lib/hadupils/extensions.rb', line 84 def self.uuid @uuid ||= UUID.new end |