module Dotenv

Constants

SCHEMA_VERSION

Public Class Methods

load(*filenames)
Also aliased as: load_without_validation
load_with_validation(*filenames) click to toggle source
# File lib/dotenv-schema.rb, line 6
def load_with_validation(*filenames)
  env_before = ENV.to_hash
  load_without_validation *filenames
  env = ENV.to_hash.reject {|k, v| env_before.has_key?(k) }

  schema = Schema.load schema_path
  schema.validate! env
end
Also aliased as: load
load_without_validation(*filenames)
Alias for: load
schema_path() click to toggle source
# File lib/dotenv-schema.rb, line 21
def schema_path
  @schema_path || '.env_schema'
end
schema_path=(path) click to toggle source
# File lib/dotenv-schema.rb, line 17
def schema_path=(path)
  @schema_path = path
end