How do I avoid doing this?
if boolean_array[day] && boolean_array[day][slot] && boolean_array[day][slot].zero?
# boolean_array[day][slot] element exists
end
Basically, you want an andand method. You can then do if boolean_array[day].andand[slot].andand.zero?.
Raganwald has one popular implementation.