Class: OctocatHerder::PullRequest::Repo
- Inherits:
-
Object
- Object
- OctocatHerder::PullRequest::Repo
- Includes:
- Base
- Defined in:
- lib/octocat_herder/pull_request/repo.rb
Overview
A representation of the repsoitory meta-data returned from the pull request API. This is only ever useful when returned from OctocatHerder::PullRequest#head or OctocatHerder::PullRequest#base.
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
-
#repo ⇒ OctocatHerder::Repository
The detailed information about the repository.
-
#user ⇒ OctocatHerder::User
The owner of this repository.
-
#user_avatar_url ⇒ String
The URL to the avatar image of the owner of this repository.
-
#user_id ⇒ Integer
The ID number of the owner of this repository.
-
#user_login ⇒ String
The login name of the owner of this repository.
-
#user_url ⇒ String
The URL of the owner of this repository.
Methods included from Base
#available_attributes, #initialize, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class OctocatHerder::Base
Instance Method Details
#repo ⇒ OctocatHerder::Repository
The detailed information about the repository.
60 61 62 |
# File 'lib/octocat_herder/pull_request/repo.rb', line 60 def repo @repo ||= OctocatHerder::Repository.new(@raw['repo'], connection) end |
#user ⇒ OctocatHerder::User
This is cached locally to the instance of OctocatHerder::PullRequest::Repo, but will make an additional API request to populate it initially.
The owner of this repository.
52 53 54 |
# File 'lib/octocat_herder/pull_request/repo.rb', line 52 def user @user ||= OctocatHerder::User.fetch(@raw['user'], connection) end |
#user_avatar_url ⇒ String
The URL to the avatar image of the owner of this repository.
34 35 36 |
# File 'lib/octocat_herder/pull_request/repo.rb', line 34 def user_avatar_url @raw['user']['avatar_url'] end |
#user_id ⇒ Integer
The ID number of the owner of this repository.
26 27 28 |
# File 'lib/octocat_herder/pull_request/repo.rb', line 26 def user_id @raw['user']['id'] end |
#user_login ⇒ String
The login name of the owner of this repository.
18 19 20 |
# File 'lib/octocat_herder/pull_request/repo.rb', line 18 def user_login @raw['user']['login'] end |
#user_url ⇒ String
The URL of the owner of this repository.
42 43 44 |
# File 'lib/octocat_herder/pull_request/repo.rb', line 42 def user_url @raw['user']['url'] end |