Created
January 7, 2016 10:32
-
-
Save krokrob/63a2da508b3c2e9f993f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# La poste est ouverte de 10h à 12h et de 14h à 16h | |
# si time > 10 et < 12 | |
# si time >14 et <16 | |
def la_poste_is_open?(time) | |
time >= 10 && time <= 12 || time >= 14 && time <= 16 | |
end | |
puts la_poste_is_open?(9) | |
puts la_poste_is_open?(11) | |
puts la_poste_is_open?(15) | |
puts la_poste_is_open?(14) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment