Class: Conjur::Env::ConjurTempfile

Inherits:
CustomTag
  • Object
show all
Defined in:
lib/conjur/conjurenv.rb

Instance Method Summary collapse

Methods inherited from CustomTag

#conjur_id, #gsub!, #init_with, #initialize

Constructor Details

This class inherits a constructor from Conjur::Env::CustomTag

Instance Method Details

#evaluate(value) ⇒ Object



52
53
54
55
56
57
58
59
60
61
# File 'lib/conjur/conjurenv.rb', line 52

def evaluate value
  @tempfile = if File.directory?("/dev/shm") and File.writable?("/dev/shm")
                Tempfile.new("conjur","/dev/shm")
              else
                Tempfile.new("conjur")
              end
  @tempfile.write(value)
  @tempfile.close
  @tempfile.path
end