Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby attr_writer example

class Person
  attr_reader :name, :age, :sex, :email
  attr_writer :name, :age, :sex, :email

  def initialize(name)
    @name = name
  end
end
Source by mixandgo.com #
 
PREVIOUS NEXT
Tagged: #ruby
ADD COMMENT
Topic
Name
8+5 =