Memoization in Ruby
Memoization is useful when you have some code that is used multiple times to avoid computing it each time.
Suppose the following example:
class Employee
def salary
CalculateSalary.call(employee: self)
end
def salary_per_hour
# for si...
kaizencodes.io3 min read