Skip to content

Commit 28663d9

Browse files
committed
Allow the OAuth client to receive a configuration block
1 parent 3274441 commit 28663d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/myob/api/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Client
88

99
attr_reader :current_company_file, :client
1010

11-
def initialize(options)
11+
def initialize(options, &block)
1212
Myob::Api::Model::Base.subclasses.each {|c| model(c.name.split("::").last)}
1313

1414
@redirect_uri = options[:redirect_uri]
@@ -20,7 +20,7 @@ def initialize(options)
2020
:site => 'https://secure.myob.com',
2121
:authorize_url => '/oauth2/account/authorize',
2222
:token_url => '/oauth2/v1/authorize',
23-
})
23+
}, &block)
2424

2525
if options[:company_file]
2626
@current_company_file = select_company_file(options[:company_file])

0 commit comments

Comments
 (0)