# What is the use of :var in ruby

**URL:** <https://www.ruby-forum.com/t/what-is-the-use-of-var-in-ruby/133144>\
**Category:** Ruby\
**Created:** [March 28, 2008, 8:48am UTC](https://www.ruby-forum.com/t/what-is-the-use-of-var-in-ruby/133144 "2008-03-28T08:48:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepkumarb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c4cdca/32.png) [@deepkumarb](https://www.ruby-forum.com/u/deepkumarb)\
**Post date:** [March 28, 2008, 8:48am UTC](https://www.ruby-forum.com/t/what-is-the-use-of-var-in-ruby/133144/1 "2008-03-28T08:48:21Z")

</div>

Hi,

I am new to Ruby, I would like to know about :var in ruby. I saw this  
question in one site but nobody provide any response for this. Please  
clear my doubt as early as possible.

Thanks

Pradeep Kumar

---

<div class="post-metadata">

**Author:** ![deepkumarb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c4cdca/32.png) [@deepkumarb](https://www.ruby-forum.com/u/deepkumarb)\
**Post date:** [March 28, 2008, 9:35am UTC](https://www.ruby-forum.com/t/what-is-the-use-of-var-in-ruby/133144/2 "2008-03-28T09:35:41Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

On Mar 28, 2008, at 8:49 AM, Pradeep B. wrote:

> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

There is a nice article about ruby symbols (that what those constructs  
are called):

> **[13 Ways of Looking at a Ruby Symbol | Random Hacks](http://www.randomhacks.net.s3-website-us-east-1.amazonaws.com/2007/01/20/13-ways-of-looking-at-a-ruby-symbol/)**
>
> Random code snippets, projects and musings about software from Eric Kidd, a developer and occasional entrepreneur.

It may be a bit hard to start with but there is a nice collection of  
articles that explain symbols at the very end. Perhaps you should read  
those first.

Greetings  
Florian G.  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkfsrWMACgkQJA/zY0IIRZb8XACfZt3Geel/YQpZrmMUR0Y1BEIm  
yvAAoJPO8sVH1l1hn7ZF4aAjoL7NVMYj  
=RgBa  
-----END PGP SIGNATURE-----
