Class: OctoMerge::ListPullRequests
- Inherits:
-
Object
- Object
- OctoMerge::ListPullRequests
- Defined in:
- lib/octo_merge/list_pull_requests.rb
Instance Attribute Summary collapse
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize(repo:, query:) ⇒ ListPullRequests
constructor
A new instance of ListPullRequests.
Constructor Details
#initialize(repo:, query:) ⇒ ListPullRequests
Returns a new instance of ListPullRequests.
5 6 7 8 |
# File 'lib/octo_merge/list_pull_requests.rb', line 5 def initialize(repo:, query:) @repo = repo @query = query end |
Instance Attribute Details
#query ⇒ Object (readonly)
Returns the value of attribute query.
3 4 5 |
# File 'lib/octo_merge/list_pull_requests.rb', line 3 def query @query end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
3 4 5 |
# File 'lib/octo_merge/list_pull_requests.rb', line 3 def repo @repo end |
Instance Method Details
#all ⇒ Object
10 11 12 |
# File 'lib/octo_merge/list_pull_requests.rb', line 10 def all @all ||= github_client.search_issues("is:open is:pr repo:#{repo} #{query}")[:items] end |