Forum: Ruby Attributes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
79822418fa28a908ca75b67de3b31b3c?d=identicon&s=25 Prabu Jayaraman (jprabu)
on 2009-02-26 13:08
Hi,


What is attr_reader, attr_writer ? Explain with any example.


Thanks...
Prabu J

jprabu2010@gmail.com
96e94657962b561ec2f9daf70192866e?d=identicon&s=25 Mark Wadham (Guest)
on 2009-02-26 13:19
(Received via mailing list)
2009/2/26 Prabu Jayaraman <jprabu2010@gmail.com>

> Hi,
>
>
> What is attr_reader, attr_writer ? Explain with any example.
>


This is very early on in the pickaxe... they allow you to specify
instances
variables that can be read and written directly from outside the
instance.

Mark
E088bb5c80fd3c4fd02c2020cdacbaf0?d=identicon&s=25 Jesús Gabriel y Galán (Guest)
on 2009-02-26 13:22
(Received via mailing list)
On Thu, Feb 26, 2009 at 1:07 PM, Prabu Jayaraman <jprabu2010@gmail.com>
wrote:
> Hi,
>
>
> What is attr_reader, attr_writer ? Explain with any example.

This might help:

http://lmgtfy.com/?q=ruby+attr_reader

First hit is a ruby introductory guide, where this is explained with
examples.

Jesus.
This topic is locked and can not be replied to.