Skip to content

Instantly share code, notes, and snippets.

@townie
Created March 3, 2014 19:08
Show Gist options
  • Save townie/9332317 to your computer and use it in GitHub Desktop.
Save townie/9332317 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 color=(new_color)
@color = new_color
end
def owner=(new_owner)
@owner = new_owner
end
def cylinders=(new_cylinders)
@cylinders = new_cylinders
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment