Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rguerrettaz
Last active December 17, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rguerrettaz/5564666 to your computer and use it in GitHub Desktop.
Save rguerrettaz/5564666 to your computer and use it in GitHub Desktop.
Method to predict your experience in Phase 3 of Dev Bootcamp
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