Class: GithubControl::User

Inherits:
Object
  • Object
show all
Defined in:
lib/github-control/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cliObject (readonly)

Returns the value of attribute cli.



3
4
5
# File 'lib/github-control/user.rb', line 3

def cli
  @cli
end

#nameObject (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_repositoriesObject



17
18
19
# File 'lib/github-control/user.rb', line 17

def private_repositories
  repositories.select { |r| r.private? }
end

#public_repositoriesObject



13
14
15
# File 'lib/github-control/user.rb', line 13

def public_repositories
  repositories.select { |r| r.public? }
end

#repositoriesObject



9
10
11
# File 'lib/github-control/user.rb', line 9

def repositories
  @repos ||= Repositories.new(self)
end