class Spore::Environment

This class inherits from Hash and represents the environemnt into which Dotenv will load key value pairs from a file.

Attributes

filename[R]

Public Class Methods

new() click to toggle source
# File lib/spore/environment.rb, line 7
def initialize
  load
end

Public Instance Methods

apply() click to toggle source
# File lib/spore/environment.rb, line 19
def apply
  each { |k, v| ENV[k] ||= Substitutions.call(v) }
end
apply!() click to toggle source
# File lib/spore/environment.rb, line 23
def apply!
  each { |k, v| ENV[k] = Substitutions.call(v) }
end
load() click to toggle source
# File lib/spore/environment.rb, line 11
def load
  update Parser.call
end
read() click to toggle source
# File lib/spore/environment.rb, line 15
def read
  File.read(@filename)
end