Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 1.04 KB

README.markdown

File metadata and controls

24 lines (21 loc) · 1.04 KB

Advanced Enumerable Exercises

  • clone down this repo and create your own github repository
  • update this gist by either commenting on it with your repo link or editing the gist.

Snack Class

class Snack
  attr_reader :name, :quantity
  def initialize(name, quantity)
    @name = name
    @quantity = quantity
  end
end
  • The above Snack class has two attributes: name and quantity.
  • Today you will be building out a VendingMachine class.
  • The name and how many of that snack are what is being added to the vending machine.
  • I have built out tests for the VendingMachine class.
  • Your mission is to build out the VendingMachine class on your own.
  • I have skipped most of the tests so make sure you are unskipping as you go.
  • Please commit to github every 15 minutes.
  • At 10am, we will jump into a new group channel (just for the snow day!) and post snippets of responses. I will ask someone specifically to post their solution to each method by looking through repos.