Refactor the ranlib attribute