Rails procedure design pattern

The class, defined above, itself is quite readable and the usage is pretty simple. It's a typical representation of the policy object pattern where the main goal of the class is to return boolean value and do not perform any complex action besides comparing and checking the values.Now imagine that we would like to tell the user why he is not able to pull the report. We would have to rebuild our policy object and create some class that would check exactly which step of verification failed and prepare a proper message. This is the perfect scenario where the procedure design pattern can be used.
Rails procedure design pattern #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/rails-procedure-design-pattern

Nezir Zahirovic

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

related articles