Class: Tinybucket::Resource::PullRequests
- Defined in:
- lib/tinybucket/resource/pull_requests.rb
Instance Method Summary collapse
-
#activities(_options) ⇒ Object
Get activities on the po.
-
#create(options) ⇒ Tinybucket::Model::PullRequest
Create a new pull request.
-
#find(pullrequest_id, options = {}) ⇒ Tinybucket::Model::PullRequest
Get the specific pull request on the repository.
-
#initialize(repo, options) ⇒ PullRequests
constructor
A new instance of PullRequests.
Constructor Details
#initialize(repo, options) ⇒ PullRequests
Returns a new instance of PullRequests.
6 7 8 9 |
# File 'lib/tinybucket/resource/pull_requests.rb', line 6 def initialize(repo, ) @repo = repo @args = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Tinybucket::Resource::Base
Instance Method Details
#activities(_options) ⇒ Object
Get activities on the po
TODO: To be implemented.
35 36 37 |
# File 'lib/tinybucket/resource/pull_requests.rb', line 35 def activities() raise NotImplementedError end |
#create(options) ⇒ Tinybucket::Model::PullRequest
Create a new pull request.
15 16 17 18 19 |
# File 'lib/tinybucket/resource/pull_requests.rb', line 15 def create() pull_requests_api.create().tap do |m| inject_repo_keys(m, @repo.repo_keys) end end |
#find(pullrequest_id, options = {}) ⇒ Tinybucket::Model::PullRequest
Get the specific pull request on the repository.
26 27 28 29 30 |
# File 'lib/tinybucket/resource/pull_requests.rb', line 26 def find(pullrequest_id, = {}) pull_requests_api.find(pullrequest_id, ).tap do |m| inject_repo_keys(m, @repo.repo_keys) end end |