# Automatically setting attributes

**URL:** <https://rubytalk.org/t/automatically-setting-attributes/12806>\
**Category:** ruby-talk\
**Created:** [29 July 2004 02:51 UTC](https://rubytalk.org/t/automatically-setting-attributes/12806 "2004-07-29T02:51:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mehr\_Assaph\_Assaph](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@Mehr\_Assaph\_Assaph](https://rubytalk.org/u/Mehr_Assaph_Assaph)\
**Post date:** [29 July 2004 02:51 UTC](https://rubytalk.org/t/automatically-setting-attributes/12806/1 "2004-07-29T02:51:08Z")

</div>

> Do those methods have any advantages over doing  
> @goo, @moo = 0, 0

You only write one zero... 🙂

The only real difference is in Joel's method of grepping for sym= type  
methods, where you don't have to specify the variables names.

---

<div class="post-metadata">

**Author:** ![David\_A\_Black3](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@David\_A\_Black3](https://rubytalk.org/u/David_A_Black3)\
**Post date:** [29 July 2004 03:04 UTC](https://rubytalk.org/t/automatically-setting-attributes/12806/2 "2004-07-29T03:04:46Z")

</div>

Hi --

> **···**
>
> On Thu, 29 Jul 2004, Mehr, Assaph (Assaph) wrote:
> 
> > \> Do those methods have any advantages over doing  
> > \> @goo, @moo = 0, 0
> > 
> > You only write one zero... 🙂
> 
> @goo = @moo = 0 # 🙂
> 
> David
> 
> --  
> David A. Black  
> dblack@wobblini.net

---

<div class="post-metadata">

**Author:** ![Joe\_Laughlin](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@Joe\_Laughlin](https://rubytalk.org/u/Joe_Laughlin)\
**Post date:** [31 July 2004 00:11 UTC](https://rubytalk.org/t/automatically-setting-attributes/12806/3 "2004-07-31T00:11:47Z")

</div>

David A. Black wrote:

> Hi --
> 
> > > Do those methods have any advantages over doing  
> > > @goo, @moo = 0, 0
> > 
> > You only write one zero... 🙂
> 
> @goo = @moo = 0 # 🙂
> 
> David

I like!

> **···**
>
> > On Thu, 29 Jul 2004, Mehr, Assaph (Assaph) wrote:
