Skip to content

Commit e47fe90

Browse files
committed
allowing initializer to read from env file
1 parent 8d19e94 commit e47fe90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/messagebird/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def initialize(errors)
2020
class Client
2121
attr_reader :access_key
2222

23-
def initialize(access_key)
24-
@access_key = access_key
23+
def initialize(access_key = nil)
24+
@access_key = access_key || ENV['MESSAGE_BIRD_ACCES_KEY']
2525
end
2626

2727
def request(method, path, params={})

0 commit comments

Comments
 (0)