Last active
December 17, 2015 06:19
-
-
Save rguerrettaz/5564666 to your computer and use it in GitHub Desktop.
Method to predict your experience in Phase 3 of Dev Bootcamp
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
def tell_fortune( previous_rails_knowledge=nil, prep=nil ) | |
good_luck = "Gloomy, your future looks. Pain and suffering, you will experience." | |
return good_luck if prep.nil? && previous_rails_knowledge.nil? | |
"The force is strong in you. Succeed, you will." | |
end | |
# Tests | |
my_experience = "Gloomy, your future looks. Pain and suffering, you will experience." | |
your_experience = "The force is strong in you. Succeed, you will." | |
puts tell_fortune() == my_experience # This is true :P | |
puts tell_fortune(nil, true) == your_experience # will be true if you do the prep! | |
puts tell_fortune("lots") == your_experience # will be true whether or not you do the prep! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment