Class: WhatsupGithub::Pulls
- Inherits:
-
Object
- Object
- WhatsupGithub::Pulls
- Defined in:
- lib/whatsup_github/pulls.rb
Overview
Gets issues found on GitHub by query
Instance Attribute Summary collapse
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#since ⇒ Object
readonly
Returns the value of attribute since.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(args = {}) ⇒ Pulls
constructor
A new instance of Pulls.
Constructor Details
#initialize(args = {}) ⇒ Pulls
Returns a new instance of Pulls.
13 14 15 16 |
# File 'lib/whatsup_github/pulls.rb', line 13 def initialize(args = {}) @repo = args[:repo] @since = args[:since] end |
Instance Attribute Details
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
11 12 13 |
# File 'lib/whatsup_github/pulls.rb', line 11 def repo @repo end |
#since ⇒ Object (readonly)
Returns the value of attribute since.
11 12 13 |
# File 'lib/whatsup_github/pulls.rb', line 11 def since @since end |
Instance Method Details
#data ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/whatsup_github/pulls.rb', line 18 def data pull_requests = [] filtered_numbers.each do |number| pull_requests << if @repo.start_with? 'enterprise:' enterprise_client.pull_request(@repo, number) else client.pull_request(@repo, number) end end pull_requests end |