Skip to content

Commit 4b9a5fd

Browse files
committed
Merge pull request #1 from mylescc/master
Allowing loading of access token from ENV file
2 parents 8d19e94 + cd4a83a commit 4b9a5fd

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['MESSAGEBIRD_ACCESS_KEY']
2525
end
2626

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

0 commit comments

Comments
 (0)