Refactoring - Replace Variable with Query

This topic is for the [Replace Variable with Query] exercise in the [Refactoring] trail. Post any questions, corrections, or pointers you have to share with other Upcase subscribers.
[Replace Variable with Query]: https://exercises.upcase.com/exercises/replace-variable-with-query
[Refactoring]: Refactoring Code | Code Refactoring Online Tutorial by thoughtbot

Hey Folks,

When I first read the title of the lesson, I didnā€™t understand what the definition of query was in this context and didnā€™t get enough from the Fowler link to understand what it meant. I found the following link to be a really thorough definition of the query method pattern, if anyone else needs some additional insight: Ruby Patterns: Query Methods.

Cheers,
Nathan

1 Like

I have absolutely no idea what the difference is between this and the first refactoring taskā€¦ ended up just pushing the same answer to see what others had done and it seems everyone else has done that too :-/