Closed movitto closed 9 years ago
@jrafanie there are a few ways it could be done, in the current case the version checker modules are mixed into the version checker class and just invoked as local methods in the VersionChecker class methods, no extra object instantiations are needed.
We could have a base version checker mixin and include that in each version checker class. But currently the only common method is 'default' so just going the simpler route should suffice for the time being.
Checked commit https://github.com/movitto/polisher-1/commit/e62e66116aa240624cbeaf1463c8855244d88b01 with rubocop 0.27.1 9 files checked, 3 offenses detected
lib/polisher/adaptors/checker_loader.rb
alias_method
instead of alias
.&:default?
as an argument to select
instead of a block.@jrafanie mergeable? (+ others?)
Based on #125, this genericizes version checker modules such that they are automatically loaded from the polisher/adaptors/version_checker dir