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.
Prabu J. (Guest)
on 2009-02-26 14:08
Hi,


What is attr_reader, attr_writer ? Explain with any example.


Thanks...
Prabu J

removed_email_address@domain.invalid
Mark Wadham (Guest)
on 2009-02-26 14:19
(Received via mailing list)
2009/2/26 Prabu J. <removed_email_address@domain.invalid>

> 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
Jesús Gabriel y Galán (Guest)
on 2009-02-26 14:22
(Received via mailing list)
On Thu, Feb 26, 2009 at 1:07 PM, Prabu J. <removed_email_address@domain.invalid>
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.