class Sem::CLI::Teams::Projects
Public Instance Methods
add(team_name, project_name)
click to toggle source
# File lib/sem/cli/teams.rb, line 232 def add(team_name, project_name) team = Sem::API::Team.find!(team_name) project = Sem::API::Project.find!(project_name) team.add_project(project) puts "Project #{project_name} added to the team." end
list(team_name)
click to toggle source
# File lib/sem/cli/teams.rb, line 214 def list(team_name) team = Sem::API::Team.find!(team_name) projects = team.projects if !projects.empty? Sem::Views::Projects.list(projects) else Sem::Views::Teams.add_first_project(team) end end
remove(team_name, project_name)
click to toggle source
# File lib/sem/cli/teams.rb, line 248 def remove(team_name, project_name) team = Sem::API::Team.find!(team_name) project = Sem::API::Project.find!(project_name) team.remove_project(project) puts "Project #{project_name} removed from the team." end