Refactor the ln_s method to decrease its cyclomatic complexity

This commit is contained in:
Nicolas McCurdy
2014-01-07 20:12:53 -05:00
parent 7e659f11fe
commit e42eff4e10
3 changed files with 11 additions and 9 deletions

View File

@@ -387,6 +387,10 @@ class Homesick < Thor
first_p.mtime > second_p.mtime && !first_p.symlink?
end
def collision_accepted?
options[:force] || shell.file_collision(destination) { source }
end
def each_file(castle, basedir, subdirs)
absolute_basedir = Pathname.new(basedir).expand_path
inside basedir do