Class: Hubkit::IssuePaginator
- Includes:
- Enumerable
- Defined in:
- lib/hubkit/issue_paginator.rb
Overview
Returns the list of issues for a repo, handling pagination for you
Instance Method Summary collapse
-
#initialize(org:, repo:, state: 'open') ⇒ IssuePaginator
constructor
Initialize a new paginator for issues from the API.
Methods inherited from Paginator
Constructor Details
#initialize(org:, repo:, state: 'open') ⇒ IssuePaginator
Initialize a new paginator for issues from the API
13 14 15 16 17 18 19 20 21 |
# File 'lib/hubkit/issue_paginator.rb', line 13 def initialize(org:, repo:, state: 'open') @org = org @repo = repo super() do |i| Cooldowner.with_cooldown do Github.issues.list(user: @org, repo: @repo, state: state, page: i) end end end |