module Printer
Public Instance Methods
get_choice_from_above()
click to toggle source
# 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_name()
click to toggle source
# File lib/Printer.rb, line 92 def get_provider_name puts "Which provider?" user_input = gets.strip end
list_right_options()
click to toggle source
# File lib/Printer.rb, line 42 def list_right_options puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" puts "!!!!!!!!!!!!! Please enter either 1, 2, 3 or 4 !!!!!!!!!!!!" puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" end
print_from_arr_of_o(instances_of_objects)
click to toggle source
# 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
print_from_arr_of_s(array_to_print)
click to toggle source
# 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
print_this(for_printing)
click to toggle source
# File lib/Printer.rb, line 106 def print_this(for_printing) puts "*****************************************************" puts " #{for_printing} " puts "*****************************************************" end
print_whole_profile(provider_instance)
click to toggle source
# 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_message()
click to toggle source
# 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_team()
click to toggle source
# 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