Skip to content

Instantly share code, notes, and snippets.

@dbc-challenges
Created October 29, 2013 17:44
Show Gist options
  • Save dbc-challenges/2d9609a07bbf7df616a7 to your computer and use it in GitHub Desktop.
Save dbc-challenges/2d9609a07bbf7df616a7 to your computer and use it in GitHub Desktop.
# 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