Class: Blend::Status::Team
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #github_client ⇒ Object
-
#initialize(project, name) ⇒ Team
constructor
A new instance of Team.
- #members ⇒ Object
- #read_only? ⇒ Boolean
- #repos ⇒ Object
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
#name ⇒ Object
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_client ⇒ Object
11 12 13 |
# File 'lib/blend/status/team.rb', line 11 def github_client Blend::Client.github_client end |
#members ⇒ Object
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
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 |
#repos ⇒ Object
15 16 17 |
# File 'lib/blend/status/team.rb', line 15 def repos @repos ||= github_client.list_team_repos @name end |