Class: Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/priority_indicator.rb

Class Method Summary collapse

Class Method Details

.runcheck(word) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/priority_indicator.rb', line 2

def self.runcheck(word)
	if [ 'Head', 'Spine', 'Brain', 'Heart','Cancerous', 'Crohn' ].any? {|array| array.include? word }
	  return 'High priority'
	elsif [ 'Flu', 'Dehydration', 'Broken', 'Fracture','STI', 'STD' ].any? {|array| array.include? word }
	return 'Medium priority'
	elsif [ 'Cold', 'Itch', 'Nausea', 'Pains','Cough', 'Sneezing' ].any? {|array| array.include? word }
	return 'Low priority'
	else
	  return 'Invalid Input'
	end
end