Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

attr_accessor ruby

class Food
 attr_accessor :protein
 def initialize(protein)
   @protein = protein
 end
end
Source by www.rubyguides.com #
 
PREVIOUS NEXT
Tagged: #ruby
ADD COMMENT
Topic
Name
6+9 =