Class: SendGrid::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_http_client.rb

Overview

Loads environment variables from a .env file.

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



9
10
11
12
13
14
15
# File 'lib/ruby_http_client.rb', line 9

def initialize
    File.open('./.env').readlines.each do |line|
    key, value = line.split '='
    ENV[key] = value.chomp
    end
    ENV
end