Class: ROM::Github::Resources::PullRequests
- Includes:
- UriHelper
- Defined in:
- lib/rom/github/resources/pull_requests.rb
Instance Method Summary collapse
- #by_number(number) ⇒ Object
- #for_repo(name) ⇒ Object
-
#for_repos(_assoc, repos) ⇒ Object
— Associations —#.
Methods included from UriHelper
Methods inherited from Base
Instance Method Details
#by_number(number) ⇒ Object
30 31 32 |
# File 'lib/rom/github/resources/pull_requests.rb', line 30 def by_number(number) append_path(CGI.escape(number.to_s)) end |
#for_repo(name) ⇒ Object
26 27 28 |
# File 'lib/rom/github/resources/pull_requests.rb', line 26 def for_repo(name) with_base_path("repos/#{escape_repository_name(name)}/pulls") end |
#for_repos(_assoc, repos) ⇒ Object
— Associations —#
35 36 37 38 39 |
# File 'lib/rom/github/resources/pull_requests.rb', line 35 def for_repos(_assoc, repos) repos.map do |repo| for_repo(repo[:full_name]).map_with(:github) end.flatten end |