Understading why attr_accessor in Ruby is faster than a regular method

Setters and getters (or accessors) are very common in various object–oriented programming languages. Some languages have shortcuts to define them, others require programmers to write them by hand (hi, Java!). Ruby does have these shortcuts: attr_reader generates getters, attr_writer generates setter, and, finally, attr_accessor generates both:.
Understading why attr_accessor in Ruby is faster than a regular method #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/understading-why-attr_accessor-in-ruby-is-faster-than-a-regular-method

Nezir Zahirovic

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

related articles