Class: Blend::Status::Team

Inherits:
Object show all
Defined in:
lib/blend/status/team.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, name) ⇒ Team

Returns a new instance of Team.



6
7
8
9
# File 'lib/blend/status/team.rb', line 6

def initialize( project, name )
  @project = project
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/blend/status/team.rb', line 4

def name
  @name
end

Instance Method Details

#github_clientObject



11
12
13
# File 'lib/blend/status/team.rb', line 11

def github_client
  Blend::Client.github_client
end

#membersObject



19
20
21
# File 'lib/blend/status/team.rb', line 19

def members
  @members ||= github_client.list_team_members( @name ).collect { |x| x['login'] }
end

#read_only?Boolean

Returns:

  • (Boolean)


23
24
25
26
# File 'lib/blend/status/team.rb', line 23

def read_only?
  @github_team ||= github_client.list_team @name
  return @github_team && @github_team['permission'] != 'push'
end

#reposObject



15
16
17
# File 'lib/blend/status/team.rb', line 15

def repos
  @repos ||= github_client.list_team_repos @name
end