diff options
| author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-19 20:04:58 -0300 |
|---|---|---|
| committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-24 16:17:52 -0300 |
| commit | 782aab1319bdcfbe1634d4b33444e8ce5b57d394 (patch) | |
| tree | 1995c7eae0095c423e0f2795ebb2389bc7992f0d /lib/github/collection.rb | |
| parent | ac1634fac9ef2891ef98d499fe6391d315b98b30 (diff) | |
| download | gitlab-ce-782aab1319bdcfbe1634d4b33444e8ce5b57d394.tar.gz | |
Pass a options hash to Github::Client
Diffstat (limited to 'lib/github/collection.rb')
| -rw-r--r-- | lib/github/collection.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/github/collection.rb b/lib/github/collection.rb index 1b0c00928c5..12d6703476b 100644 --- a/lib/github/collection.rb +++ b/lib/github/collection.rb @@ -1,5 +1,11 @@ module Github class Collection + attr_reader :options + + def initialize(options) + @options = options + end + def fetch(url, query = {}) return [] if url.blank? @@ -16,7 +22,7 @@ module Github private def client - @client ||= Github::Client.new + @client ||= Github::Client.new(options) end end end |
