Fixing more rubocop warnings

@geemus It was giving `Avoid more than 3 levels of block nesting.` on this block.

I changed the code to fix it, but there is no test for this class and the method is just insane to test so i just triple checked it by executing the logic in a paper (Yeah, i know :open_mouth:)

Please, check it carefully. =)