class Dotenv::Environment
The two apply functions are all that need to be overwritten
Public Instance Methods
apply()
click to toggle source
sets all environment variables that are keyth: links with the appropriate key value, sets all missing env variables otherwise
# File lib/keyth/dotenv.rb, line 8 def apply each do |k, v| if v =~ /^keyth\:(.*)/ ENV[k] = Keyth.get_key_safe(Regexp.last_match[1]) || '' else ENV[k] ||= v end end end
apply!()
click to toggle source
sets all environment variables that are keyth: links with the appropriate key value, overwrites all env variables with the contents from .env otherwise
# File lib/keyth/dotenv.rb, line 21 def apply! each do |k, v| if v =~ /^keyth\:(.*)/ ENV[k] = Keyth.get_key_safe(Regexp.last_match[1]) || '' else ENV[k] = v end end end