On Sat, Mar 26, 2011 at 1:16 PM, Vicente Bosch Campos <vbosch / gmail.com> wr=
ote:
> I have not explained my self properly. Imagine we are talking about makin=
g an instance of any other object e.g. a Car and the car has a name and it =
allows you reference the car instance by it in the future.
>
> Would you prefer the car name is defined by the variable that contains it=
 or by setting the name in the constructor?
>
> hotwheels =3D Car.new
>
> current_car =3D Car.new("hotwheels")
>
> I don't think anyone would understand directly that I have automatically =
set a property inside my car with the variable name. It would be a bit coun=
terintuitive and different from how any other instance properties work on t=
his class and how they are usually set on any other type of object of any l=
ibrary.
>
> Considering the Class to be an object too by not allowing me set the name=
 at the .new and taking the name of the left hand side of the equality sign=
 in case it is a Constant ( otherwise it does not) it is not acting very mu=
ch like any other object.

Is there a way in Ruby to do this with objects generally (i.e. to
automatically set a name property upon assignment with =3D), not just
with Classes?