Module: UserInputExe

Defined in:
lib/UserInputExe.rb

Instance Method Summary collapse

Instance Method Details

#choice_1Object



5
6
7
# File 'lib/UserInputExe.rb', line 5

def choice_1
  Printer::print_from_arr_of_o(Providers.all)
end

#choice_2Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/UserInputExe.rb', line 11

def choice_2

  user_input = Printer::get_provider_name
  req_provider = Providers.all.detect do |provider|
                      user_input == provider.name
                    end

  if req_provider == nil
    Printer::warning_message
    choice_2
  else
    Printer::print_whole_profile(req_provider)
  end

end

#choice_3Object



29
30
31
32
33
34
35
36
37
# File 'lib/UserInputExe.rb', line 29

def choice_3

  instances_of_teams = Teams.all
  Printer::print_from_arr_of_o(instances_of_teams)

  user_input = Printer::get_choice_from_above
  Printer::print_from_arr_of_s(Teams.providers_by_team(user_input))

end

#choice_4Object



41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/UserInputExe.rb', line 41

def choice_4

  instances_of_specialties = Specialites.all
  Printer::print_from_arr_of_o(instances_of_specialties)

  user_input = Printer::get_choice_from_above
  instances_of_specialties.each do |specialty|
    if specialty.name == user_input
      Printer::print_from_arr_of_o(specialty.providers)
    end
  end

end

#choice_5Object



57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/UserInputExe.rb', line 57

def choice_5

  instances_of_languages = Languages.all
  Printer::print_from_arr_of_o(instances_of_languages)

  user_input = Printer::get_choice_from_above
  instances_of_languages.each do |language|
    if language.name == user_input
      Printer::print_from_arr_of_o(language.providers)
    end
  end

end

#choice_6Object



73
74
75
76
77
78
79
80
81
82
83
# File 'lib/UserInputExe.rb', line 73

def choice_6

  user_input = Printer::get_provider_name

  if Teams.team_by_provider_name(user_input) == nil
    Printer::warning_message_team
  else
    Printer::print_this(Teams.team_by_provider_name(user_input))
  end

end