Attr_Accessor Ruby
class Food
attr_accessor :protein
def initialize(protein)
@protein = protein
end
end
Gifted Gazelle
class Food
attr_accessor :protein
def initialize(protein)
@protein = protein
end
end
class Person
attr_reader :name, :age, :sex, :email
attr_writer :name, :age, :sex, :email
def initialize(name)
@name = name
end
end