What does CarGem do?

CarGem allows the author of a ruby script to instantiate convieniently configured Car objects in various versions.

Here's an example use, where we generate a Camaro and tell it to drive.

irb> require 'cargem' && Camaro.new.drive

Class methods

  • Camaro#accelerate # Increments current_speed by 1
  • Camaro#drive # Drive calls accelerate until it hits max speed