Skip to content

Instantly share code, notes, and snippets.

@hchood
Created November 26, 2013 02:58
Show Gist options
  • Save hchood/7652821 to your computer and use it in GitHub Desktop.
Save hchood/7652821 to your computer and use it in GitHub Desktop.
OOP Fundamentals I: Assignment 3
# OOP Fundamentals I: Assignment 3
class Car
def initialize(color, owner, cylinders)
@color = color
@owner = owner
@cylinders = cylinders
end
def color
@color
end
def owner
@owner
end
def cylinders
@cylinders
end
end
dans_car = Car.new('black', 'Dan', 4)
dans_car.color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment