Class: GithubControl::User
- Inherits:
-
Object
- Object
- GithubControl::User
- Defined in:
- lib/github-control/user.rb
Instance Attribute Summary collapse
-
#cli ⇒ Object
readonly
Returns the value of attribute cli.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(cli, name) ⇒ User
constructor
A new instance of User.
- #private_repositories ⇒ Object
- #public_repositories ⇒ Object
- #repositories ⇒ Object
Constructor Details
#initialize(cli, name) ⇒ User
Returns a new instance of User.
5 6 7 |
# File 'lib/github-control/user.rb', line 5 def initialize(cli, name) @cli, @name = cli, name end |
Instance Attribute Details
#cli ⇒ Object (readonly)
Returns the value of attribute cli.
3 4 5 |
# File 'lib/github-control/user.rb', line 3 def cli @cli end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/github-control/user.rb', line 3 def name @name end |
Instance Method Details
#private_repositories ⇒ Object
17 18 19 |
# File 'lib/github-control/user.rb', line 17 def private_repositories repositories.select { |r| r.private? } end |
#public_repositories ⇒ Object
13 14 15 |
# File 'lib/github-control/user.rb', line 13 def public_repositories repositories.select { |r| r.public? } end |
#repositories ⇒ Object
9 10 11 |
# File 'lib/github-control/user.rb', line 9 def repositories @repos ||= Repositories.new(self) end |