Module: Virtuatable::Builders::Helpers::Environment

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/virtuatable/builders/helpers/environment.rb

Overview

Loads the environment variables from the .env file at the project’s root.

Author:

Instance Method Summary collapse

Instance Method Details

#env_file(name = '') ⇒ Object



20
21
22
# File 'lib/virtuatable/builders/helpers/environment.rb', line 20

def env_file(name = '')
  File.join(directory, "#{name}.env")
end

#load_environment!Object

Loads the environment variables used in the application.



16
17
18
# File 'lib/virtuatable/builders/helpers/environment.rb', line 16

def load_environment!
  Dotenv.load(env_file, env_file(mode))
end