Created
December 8, 2011 19:46
-
-
Save rubiety/1448238 to your computer and use it in GitHub Desktop.
freezing.rb
This file contains hidden or 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
class City | |
def freezing? | |
case name | |
when "San Diego" | |
current_temperature < 60 | |
when "Austin" | |
current_temperature < 50 | |
when "Rochester" | |
current_temperature < -10 | |
else | |
current_temperature < 32 | |
end | |
end | |
end |
I was going to write it in JavaScript for Dan, but then I realized it would be the syntax clusterfuck that JavaScript is ;-)
hehe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
freezing.js Ruby # ?