class LinuxHub::GithubTeam
Public Class Methods
new(organisation:, team:)
click to toggle source
# File lib/linux-hub/github_team.rb, line 3 def initialize(organisation:, team:) @org = organisation @team = team end
Public Instance Methods
team_id()
click to toggle source
# File lib/linux-hub/github_team.rb, line 12 def team_id @team_id ||= fetch_team_id end
users()
click to toggle source
# File lib/linux-hub/github_team.rb, line 8 def users @users ||= fetch_users end
Private Instance Methods
client()
click to toggle source
# File lib/linux-hub/github_team.rb, line 30 def client Github.instance.client end
fetch_team_id()
click to toggle source
# File lib/linux-hub/github_team.rb, line 25 def fetch_team_id team = client.organization_teams(@org).find { |t| t[:name] == @team } team.id end
fetch_users()
click to toggle source
# File lib/linux-hub/github_team.rb, line 18 def fetch_users users = client.team_members(team_id).collect do |member| GithubUser.new(member.login) end users end