class OctocatHerder::PullRequest::Repo
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
.
Public Instance Methods
The detailed information about the repository.
@since 0.0.1 @return [OctocatHerder::Repository]
# File lib/octocat_herder/pull_request/repo.rb, line 60 def repo @repo ||= OctocatHerder::Repository.new(@raw['repo'], connection) end
The owner of this repository.
@note This is cached locally to the instance of OctocatHerder::PullRequest::Repo
, but will make an additional API request to populate it initially.
@since 0.0.1 @return [OctocatHerder::User]
# File lib/octocat_herder/pull_request/repo.rb, line 52 def user @user ||= OctocatHerder::User.fetch(@raw['user'], connection) end
The URL to the avatar image of the owner of this repository.
@since 0.0.1 @return [String]
# File lib/octocat_herder/pull_request/repo.rb, line 34 def user_avatar_url @raw['user']['avatar_url'] end
The ID number of the owner of this repository.
@since 0.0.1 @return [Integer]
# File lib/octocat_herder/pull_request/repo.rb, line 26 def user_id @raw['user']['id'] end
The login name of the owner of this repository.
@since 0.0.1 @return [String]
# File lib/octocat_herder/pull_request/repo.rb, line 18 def user_login @raw['user']['login'] end
The URL of the owner of this repository.
@since 0.0.1 @return [String]
# File lib/octocat_herder/pull_request/repo.rb, line 42 def user_url @raw['user']['url'] end
Private Instance Methods
# File lib/octocat_herder/pull_request/repo.rb, line 66 def addtional_attributes ['user_login', 'user_id', 'user_avatar_url', 'user_url'] end