Class: GithubControl::Repository
- Inherits:
-
Object
- Object
- GithubControl::Repository
- Defined in:
- lib/github-control/repository.rb
Instance Attribute Summary collapse
-
#access ⇒ Object
readonly
Returns the value of attribute access.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
Instance Method Summary collapse
- #collaborators ⇒ Object
- #destroy ⇒ Object
- #full_name ⇒ Object
-
#initialize(owner, name, access) ⇒ Repository
constructor
A new instance of Repository.
- #post_receive_urls ⇒ Object
- #private? ⇒ Boolean
- #public? ⇒ Boolean
Constructor Details
#initialize(owner, name, access) ⇒ Repository
Returns a new instance of Repository.
5 6 7 |
# File 'lib/github-control/repository.rb', line 5 def initialize(owner, name, access) @owner, @name, @access = owner, name, access end |
Instance Attribute Details
#access ⇒ Object (readonly)
Returns the value of attribute access.
3 4 5 |
# File 'lib/github-control/repository.rb', line 3 def access @access end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/github-control/repository.rb', line 3 def name @name end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
3 4 5 |
# File 'lib/github-control/repository.rb', line 3 def owner @owner end |
Instance Method Details
#collaborators ⇒ Object
21 22 23 |
# File 'lib/github-control/repository.rb', line 21 def collaborators @collaborators ||= Collaborators.new(self) end |
#destroy ⇒ Object
29 30 31 |
# File 'lib/github-control/repository.rb', line 29 def destroy @owner.repositories.delete(@name) end |
#full_name ⇒ Object
17 18 19 |
# File 'lib/github-control/repository.rb', line 17 def full_name "#{@owner.name}/#{@name}" end |
#post_receive_urls ⇒ Object
25 26 27 |
# File 'lib/github-control/repository.rb', line 25 def post_receive_urls @post_receive_urls ||= PostReceiveUrls.new(self) end |
#private? ⇒ Boolean
9 10 11 |
# File 'lib/github-control/repository.rb', line 9 def private? @access == :private end |
#public? ⇒ Boolean
13 14 15 |
# File 'lib/github-control/repository.rb', line 13 def public? @access == :public end |