Class: Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/priority_patient.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_patient.rb', line 2

def self.runcheck(word)
  if [ 'Head', 'Spine', 'Shot', 'Heart','Birdflu', 'Sepsis' ].any? {|array| array.include? word }
    return 'Send to hospital'
  elsif [ 'Head', 'Spine', 'Shot', 'Heart','Birdflu', 'Sepsis' ].any? {|array| array.include? word }
  return ''
  elsif [ 'Head', 'Spine', 'Shot', 'Heart','Birdflu', 'Sepsis' ].any? {|array| array.include? word }
  return ''
  else
    return 'Invalid Input'
  end
end