Correct attribute memoization for ruby, made easy