Why the @ in Ruby?

I’m new to ruby and one of the first things I noticed was the @
preceding the use of every class member. Was this a design decision of
the language with no particular justification or is there a more
technical justification?

var - local variable
@var - instance/member variable
@@var - class variable (may not what you want)
$var - global variable

important is that each of this have different scopes

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs