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 #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

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

related articles