class IdonethisCli::Team
Public Instance Methods
current()
click to toggle source
# File lib/idonethis_cli/team.rb, line 33 def current cli.say "#{settings.team['name']}" end
list()
click to toggle source
# File lib/idonethis_cli/team.rb, line 7 def list return nil unless authenticated? teams.each.with_index(1) do |team, idx| cli.say "#{idx}. #{team['name']}" end end
set()
click to toggle source
# File lib/idonethis_cli/team.rb, line 17 def set return nil unless authenticated? cli.choose do |menu| menu.prompt = "Please select the team you wish to set:" teams.each do |team| menu.choice(team['name']) do cli.say("#{team['name']} set") settings.set_team(team) end end end end
Private Instance Methods
team_client()
click to toggle source
# File lib/idonethis_cli/team.rb, line 38 def team_client @team_client ||= IdonethisCli::Client::Team.new(token) end
teams()
click to toggle source
# File lib/idonethis_cli/team.rb, line 42 def teams team_client.list end