New to programming and to Ruby, and I hope this question about symbols is in line. I understand that symbols in Ruby (e.g., :book, :price) are usef
Ruby's attr_accessor, attr_reader, and attr_writer are just shorthand ways of avoiding writing a bit of repetitive code. The following question expands on how these work: Why use Ruby's attr_accessor, attr_reader and attr_writer?
Instead of thinking of attr_reader :book as a variable, just think of it as a name of an attribute that is specified using a symbol.