Mega Code Archive
Categories
/
Ruby
/
Class
The code adds an instance variable named @color that stores the color of the animal to the initialize method
class Animal def initialize @color = "red" end end