class MediCheck
Public Class Methods
runcheck(injury)
click to toggle source
# File lib/medichecker.rb, line 2 def self.runcheck(injury) if [ 'Head', 'Neck', 'Spine', 'Heart', 'Cancer', 'AIDS', 'Baby'].any? {|array| array.include? injury } return 'Serious, High Severity' elsif [ 'Chest', 'Fracture', 'Broken', 'Hip', 'Asthma', 'Eye'].any? {|array| array.include? injury } return 'Medium Serverity' elsif [ 'Cold', 'Wrist', 'Ankle', 'Cough', 'Shivers', 'Sneezing', 'Sneeze', 'Scratch'].any? {|array| array.include? injury } return [ 'Not Serious, Low Serverity'] else return 'Invalid Statment' end end