ruby attr_accessor define attribute as array code example
Example: attr_accessor ruby
class Food
attr_accessor :protein
def initialize(protein)
@protein = protein
end
end
class Food
attr_accessor :protein
def initialize(protein)
@protein = protein
end
end