Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Auto
- def initialize(year, make, model)
- @year = year
- @make = make
- @model = model
- end
- attr_accessor :year
- attr_accessor :make
- attr_accessor :model
- end
- myCar = Auto.new(2015, "Ford", "Mustang")
- puts myCar.year
- puts myCar.make
- puts myCar.model
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement