What does it mean that `attr_accessor` / `attr_reader` create an instance variable?

Viewed 548

The documentation for attr_accessor explicitly says that it creates an instance variable:

[...] creating an instance variable (@name) and a corresponding access method [...]

As does the documentation for attr_reader:

Creates instance variables and corresponding methods [...]

I understand the second part, i.e. that attr_accessor and attr_reader create methods, but I don't get the first part.

What does it mean that they "create an instance variable"?

2 Answers
Related