Sha256: 583fead67a0e6e5990c247dd451dd94d16f5a2b3917bd4e90b70ff6581fce9a7
Contents?: true
Size: 662 Bytes
Versions: 14
Compression:
Stored size: 662 Bytes
Contents
module Manpages class Uninstall def initialize(gem_spec, gem_dir, target_dir) @gem_spec = gem_spec @gem_dir = gem_dir @target_dir = target_dir end def uninstall_manpages unlink_manpages if GemVersion.new(@gem_spec).latest? end private def unlink_manpages ManFiles.new(@gem_dir, @target_dir).manpages.each do |file| unlink_manpage(file) end end def unlink_manpage(file) man_target_file = ManFiles.new(@gem_dir, @target_dir).man_file_path(file) FileUtils.rm(man_target_file) if man_target_file.symlink? && man_target_file.readlink == file end end end
Version data entries
14 entries across 14 versions & 3 rubygems