Class: OctocatHerder::PullRequest::Repo

Inherits:
Base
  • Object
show all
Defined in:
lib/octocat_herder/pull_request/repo.rb

Instance Attribute Summary

Attributes inherited from Base

#connection, #raw

Instance Method Summary collapse

Methods inherited from Base

#available_attributes, #initialize, #method_missing

Constructor Details

This class inherits a constructor from OctocatHerder::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OctocatHerder::Base

Instance Method Details

#addtional_attributesObject



32
33
34
# File 'lib/octocat_herder/pull_request/repo.rb', line 32

def addtional_attributes
  ['user_login', 'user_id', 'user_avatar_url', 'user_url']
end

#repoObject



28
29
30
# File 'lib/octocat_herder/pull_request/repo.rb', line 28

def repo
  @repo = OctocatHerder::Repository.new(@raw['repo'], connection)
end

#userObject



24
25
26
# File 'lib/octocat_herder/pull_request/repo.rb', line 24

def user
  @user = OctocatHerder::User.fetch(@raw['user'], connection)
end

#user_avatar_urlObject



16
17
18
# File 'lib/octocat_herder/pull_request/repo.rb', line 16

def user_avatar_url
  @raw['user']['avatar_url']
end

#user_idObject



12
13
14
# File 'lib/octocat_herder/pull_request/repo.rb', line 12

def user_id
  @raw['user']['id']
end

#user_loginObject



8
9
10
# File 'lib/octocat_herder/pull_request/repo.rb', line 8

def 
  @raw['user']['login']
end

#user_urlObject



20
21
22
# File 'lib/octocat_herder/pull_request/repo.rb', line 20

def user_url
  @raw['user']['url']
end