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]:

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.


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 :-/