Skip to content

Instantly share code, notes, and snippets.

@carterS
carterS / zoo.js
Created October 24, 2013 18:17 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------
class Vehicle
attr_reader :color, :wheels, :status
def initialize(attributes = {})
@wheels = attributes[:wheels]
@color = attributes[:color]
end
def drive
@status = :driving
end