/0.3-pez_class_original_gist.rb Secret
Created
October 29, 2013 17:44
-
Star
(0)
You must be signed in to star a gist -
Fork
(293)
You must be signed in to fork a gist
-
-
Save dbc-challenges/2d9609a07bbf7df616a7 to your computer and use it in GitHub Desktop.
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
| # we know we have at least this class: | |
| class PezDispenser | |
| # your code here! | |
| end | |
| # driver test code | |
| flavors = %w(cherry chocolate cola grape lemon orange peppermint raspberry strawberry).shuffle | |
| super_mario = PezDispenser.new(flavors) | |
| puts "A new pez dispenser has been created. You have #{super_mario.pez_count} pez!" | |
| puts "Here's a look inside the dispenser:" | |
| puts super_mario.see_all_pez | |
| puts "Adding a purple pez." | |
| super_mario.add_pez("purple") # mmmmm, purple flavor | |
| puts "Now you have #{super_mario.pez_count} pez!" | |
| puts "Oh, you want one do you?" | |
| puts "The pez flavor you got is: #{super_mario.get_pez}" | |
| puts "Now you have #{super_mario.pez_count} pez!" | |
| # what are the 3 components of a user story? | |
| # 1) | |
| # 2) | |
| # 3) | |
| # | |
| # any "aha!" moments? take a moment to reflect! | |
| # | |
| # | |
| # | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment