Skip to content

alfosco/advanced_enums

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%