swanson/stringer — pull request #251 by Koronen (2013-08-01 21:21:37+00:00)
Title: Refactor FeverAPI

Seeing as `FeverAPI` was ranked the second worst class in terms of complexity on CodeClimate at the time of writing (ranked D), I've started making an effort to try and do something about it. Most significantly, I've extracted the building of a response given parameters to a separate class (`Fever::Response`). This makes `FeverAPI` responsible for setting up the Sinatra app and `Fever::Response` responsible for building a response. I've also extracted a couple of small methods, such as `favicons` and `total_items`.

I would appreciate feedback on the changes made so far. Does the extraction of `Fever::Response` make sense? Is the code more readable now than before?