RubyFlow The Ruby and Rails community linklog

RFS: Attr Reader, Writer and Accessor [free video]

In ruby a lot can be achieved in a single line of code. Defining our own getters and setters is usually done when we need custom behavior for all other cases there is already something built in ruby. We’ll cover attr_reader, attr_writer and attr_accessor in this post.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in