Refactoring - Extract Value Object

This topic is for the [Extract Value Object] exercise in the [Refactoring] trail. Post any questions, corrections, or pointers you have to share with other Upcase subscribers.
[Extract Value Object]: https://exercises.upcase.com/exercises/extract-value-object
[Refactoring]: Refactoring Code | Code Refactoring Online Tutorial by thoughtbot

I am really not able to understand what exactly we have to do in this exercise? Can someone please elaborate a bit more

In this exercise, you’re supposed to refactor lib/report_card.rb so that it makes use of a Value Object, which is essentially a class that holds an immutable value. The new object is to be for grades, so as you can see from report_card.rb, the method that returns the letter grades is to be replaced.

I found this very helpful:

1 Like