Don’t wrap instance variables in attr_reader unless necessary - Code with Jason

I’ve occasionally come across advice to wrap instance variables in attr_reader. There are two supposed benefits of this practice, which I’ll describe shortly. First I’ll provide a piece of example code.
Don’t wrap instance variables in attr_reader unless necessary - Code with Jason #ruby #rubydeveloper #rubyonrails #code https://rubyonrails.ba/single/don-t-wrap-instance-variables-in-attr_reader-unless-necessary-code-with-jason

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles