Hi guys, I’ve been working on a new code base lately I have to do a new change to the application so I started checking out some metrics for the class which I have to make the change I found out a flog total score of 450 and in the particular method there is an score of 192 which is obviously high for complexity there are bunch of reek reported smells also but the churn report is what strikes me and is the reason for this question; it’s none existent so I was thinking in just extract some methods to clarify the intention of the method in question; but then again also I considered to extract an entire class which handles the method’s logic; that class is an active record model if I extract it I will be able to test it in isolation. What you guys suggest in this type of situations? Should I just go ahead and add more code to satisfy the solution; which I really don’t like because of the current mess or which could be a better refactor at this stage? extract method or extract class.
Thanks in advance for any suggestion,