[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Attributes

Prabu Jayaraman

2/26/2009 12:07:00 PM

Hi,


What is attr_reader, attr_writer ? Explain with any example.


Thanks...
Prabu J

jprabu2010@gmail.com
--
Posted via http://www.ruby-....

2 Answers

Mark Wadham

2/26/2009 12:17:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

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

Jesús Gabriel y Galán

2/26/2009 12:18:00 PM

0

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+a...

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

Jesus.