Skip to content

Instantly share code, notes, and snippets.

@jmoon90
Created November 26, 2013 18:30
Show Gist options
  • Select an option

  • Save jmoon90/7663389 to your computer and use it in GitHub Desktop.

Select an option

Save jmoon90/7663389 to your computer and use it in GitHub Desktop.
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)
puts dans_car.color
puts dans_car.owner
puts dans_car.cylinders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment