Skip to content

Instantly share code, notes, and snippets.

@radavis
Created August 26, 2013 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radavis/6345116 to your computer and use it in GitHub Desktop.
Save radavis/6345116 to your computer and use it in GitHub Desktop.
class Car
attr_reader :color, :owner, :cylinders
def initialize(color, owner, cylinders)
@color = color
@owner = owner
@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