Class: Tinybucket::Resource::PullRequests

Inherits:
Base
  • Object
show all
Defined in:
lib/tinybucket/resource/pull_requests.rb

Instance Method Summary collapse

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, options)
  @repo = repo
  @args = [options]
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.

Raises:

  • (NotImplementedError)

33
34
35
# File 'lib/tinybucket/resource/pull_requests.rb', line 33

def activities(_options)
  raise NotImplementedError
end

#create(_options) ⇒ Object

TODO:

to be implemented.

Create a new pull request.

Raises:

  • (NotImplementedError)

    to be implemented.


15
16
17
# File 'lib/tinybucket/resource/pull_requests.rb', line 15

def create(_options)
  raise NotImplementedError
end

#find(pullrequest_id, options = {}) ⇒ Tinybucket::Model::PullRequest

Get the specific pull request on the repository.

Parameters:

  • pullrequest_id (String)
  • options (Hash) (defaults to: {})

Returns:


24
25
26
27
28
# File 'lib/tinybucket/resource/pull_requests.rb', line 24

def find(pullrequest_id, options = {})
  pull_requests_api.find(pullrequest_id, options).tap do |m|
    inject_repo_keys(m, @repo.repo_keys)
  end
end