Refactor ExtractsPath into a class
ExtractsRef
module was refactored into a class ExtractsRef::RefExtractor
that didn't depend on instance variables in !131125 (merged).
ExtractsRef
module still exists because ExtractsPath
module depends on ExtractRef
.
ExtractsPath
shares the same problems as ExtractsRef
did and should be refactored into a class.
-
Contrary to what its location indicates (
lib
), it's been written to be used as a controller concern and the vast majority of its consumers are Rails controllers. -
The module extensively uses instance variables to achieve its goals and it's hard to reason about the code !131125 (comment 1546934017).
-
Refactor ExtractsPath
into a new class. -
Remove ExtractsPath
andExtractsRef
module when done.
Roadmap
-
Extract
ExtractsRef
logic into a classExtractsRef::RefExtractor
-✅ -
Replace calls to
ExtractsRef
withExtractsRef::RefExtractor
-✅ -
Use
ExtractsRef::RefExtractor
inExtractsRef
-✅ -
Merge
ExtractsRef
intoExtractsPath
-✅ - Extract logic from
ExtractsPath
into a class -🛠 - Replace
ExtractsPath
calls with calls to new classes -🛠 - Remove
ExtractsPath
module -🛠
Edited by Vasilii Iakliushin