Skip to content

Instantly share code, notes, and snippets.

@troyleach
Created January 21, 2015 22:20
Show Gist options
  • Select an option

  • Save troyleach/1f2afe9a55b26112f47d to your computer and use it in GitHub Desktop.

Select an option

Save troyleach/1f2afe9a55b26112f47d to your computer and use it in GitHub Desktop.
screencast 16
#screen cast 16
# so I guess I @cheated!!
class Car
def new_car
@mercedes = []
end
def engine
@mercedes.push("engine")
end
def wheels
@mercedes.push("wheels")
end
def radio
@mercedes.push("radio")
end
def cupholder
@mercedes.push("cup holder")
end
def assembled_car
@mercedes
end
end
newCar = Car.new
newCar.new_car
newCar.engine
newCar.wheels
newCar.radio
newCar.cupholder
p newCar.assembled_car
@markeban

Copy link
Copy Markdown

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment