Class: ROM::Github::Resources::PullRequests

Inherits:
Base
  • Object
show all
Includes:
UriHelper
Defined in:
lib/rom/github/resources/pull_requests.rb

Instance Method Summary collapse

Methods included from UriHelper

#escape_repository_name

Methods inherited from Base

#page, #per_page

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