Module: Printer

Defined in:
lib/Printer.rb

Instance Method Summary collapse

Instance Method Details

#get_choice_from_aboveObject



99
100
101
102
# File 'lib/Printer.rb', line 99

def get_choice_from_above
  puts "Please choose from the list above to get the relevant providers:"
  user_input = gets.strip
end

#get_provider_nameObject



92
93
94
95
# File 'lib/Printer.rb', line 92

def get_provider_name
  puts "Which provider?"
  user_input = gets.strip
end

#list_right_optionsObject



42
43
44
45
46
# File 'lib/Printer.rb', line 42

def list_right_options
  puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
  puts "!!!!!!!!!!!!!  Please enter either 1, 2, 3 or 4  !!!!!!!!!!!!"
  puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
end


50
51
52
53
54
55
56
57
58
# File 'lib/Printer.rb', line 50

def menu_screen
  puts "Choose from the following menu:"
  puts "1) List of all providers"
  puts "2) Details on a specific provider"
  puts "3) List of providers by their team"
  puts "4) List of providers by their specialty"
  puts "5) List of providers by their languages"
  puts "6) Get a specific provider's team?"
end


62
63
64
65
66
67
68
69
# File 'lib/Printer.rb', line 62

def print_from_arr_of_o(instances_of_objects)
  puts "<<<<<<<<<<<<                HERE IS THE LIST:                             >>>>>>>>>>>"
  instances_of_objects.each do |object|
    puts object.name
  end
  puts "^^^^^^                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                       ^^^^^^^"
  puts "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
end


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/Printer.rb', line 23

def print_from_arr_of_s(array_to_print)

  if array_to_print.length == 0
    warning_message
  else
    puts "<<<<<<<<<<<<                HERE IS THE LIST:                             >>>>>>>>>>>"
    i = 0
    while i < array_to_print.size
      puts array_to_print[i]
      i+=1
    end
    puts "^^^^^^                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                       ^^^^^^^"
    puts "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
  end

end


106
107
108
109
110
# File 'lib/Printer.rb', line 106

def print_this(for_printing)
  puts "*****************************************************"
  puts "                #{for_printing}                      "
  puts "*****************************************************"
end


73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/Printer.rb', line 73

def print_whole_profile(provider_instance)

  puts "=============================="
  if Teams.team_by_provider_name(provider_instance.name) != nil
    puts "#{provider_instance.name}'s team: #{Teams.team_by_provider_name(provider_instance.name)}"
  end
  puts "#{provider_instance.name}'s specialties: #{Specialites.specialties_by_provider(provider_instance)}"
  #puts "#{provider_instance.name}'s specialties: #{provider_instance.specialties}"
  puts "#{provider_instance.name}'s languages: #{Languages.languages_by_provider(provider_instance)}"
  puts "#{provider_instance.name}'s qualifications: #{provider_instance.qualifications}"
  if provider_instance.title != nil
    puts "#{provider_instance.name}'s title: #{provider_instance.title}"
  end
  puts "=============================="

end

#warning_messageObject



7
8
9
10
11
# File 'lib/Printer.rb', line 7

def warning_message
  puts "======================================================================================================"
  puts "!!!!!!!!   The doctor, team or specialty that you have choosen does not exit in this clinic   !!!!!!!!"
  puts "======================================================================================================"
end

#warning_message_teamObject



15
16
17
18
19
# File 'lib/Printer.rb', line 15

def warning_message_team
  puts "======================================================================================================"
  puts "!!!!!!!!     You've chosen a doctor that either does not exist or is not part os any team     !!!!!!!!"
  puts "======================================================================================================"
end