From: alberto kaputchella Date: 2011-09-16T05:39:00+09:00 Subject: Re: Some newbie questions Vladimir Van Bauenhoffer wrote in post #1022210: > I got some newbie questions which I would very much appreciate if > someone could answer (in a way that a newbie would understand): > > 1. What does @ mean in Ruby? Im sure I have seen variables like this: > @variable. A new datatype like the :symbol perhaps? > The @ means that the variable is an object variable, its scope is within, and is associated to, the current object. For example, class Person def initialize(name) @name=name end def say_your_name puts @name end In this class, you assign the name provided to the class to @name. @name as an object variable, is then accessible from any other method inside the object. -- Posted via http://www.ruby-forum.com/.