sprawdź czas między 9.30 a 4 rubinem

Mam kod, który go błędnie tworzy i myślę, że musi istnieć lepszy sposób na sprawdzenie czasu> 9.30 rano i czasu <4 po południu.

<code>def checkTime

   goodtime=false
   if(Time.now.hour>9 and Time.now.min>30) then

     if(Time.now.hour<16) then
       goodtime=true

     else
       # do nothing
     end
   elsif Time.now.hour>9 and Time.now.hour<16 then
     goodtime=true

   else
      # do nothing
   end
   return goodtime

 end
</code>

questionAnswers(4)

yourAnswerToTheQuestion