These are Ruby methods that automatically generate getter and/or setter methods for instance variables — eliminating boilerplate. Since instance variables (@name) are private and not directly accessible from outside, you need accessor methods to read/write them, and attr_* generates these concisely.
The problem they solve
()
= name
()
= value
