Class: SendGrid::Config
- Inherits:
-
Object
- Object
- SendGrid::Config
- Defined in:
- lib/ruby_http_client.rb
Overview
Loads environment variables from a .env file.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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 |