Class: IdonethisCli::Team
- Defined in:
- lib/idonethis_cli/team.rb
Instance Method Summary collapse
Instance Method Details
#current ⇒ Object
33 34 35 |
# File 'lib/idonethis_cli/team.rb', line 33 def current cli.say "#{settings.team['name']}" end |
#list ⇒ Object
7 8 9 10 11 12 13 |
# 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 ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/idonethis_cli/team.rb', line 17 def set return nil unless authenticated? cli.choose do || .prompt = "Please select the team you wish to set:" teams.each do |team| .choice(team['name']) do cli.say("#{team['name']} set") settings.set_team(team) end end end end |