Object
# File rbs-2.1.0/lib/rbs/collection/cleaner.rb, line 6 def initialize(lockfile_path)) @lock = Config.from_path(lockfile_path) end
# File rbs-2.1.0/lib/rbs/collection/cleaner.rb, line 10 def clean lock.repo_path.glob('*/*') do |dir| *_, gem_name, version = dir.to_s.split('/') gem_name or raise version or raise next if needed? gem_name, version FileUtils.remove_entry_secure(dir.to_s) end end
# File rbs-2.1.0/lib/rbs/collection/cleaner.rb, line 21 def needed?(gem_name, version) gem = lock.gem(gem_name) return false unless gem gem['version'] == version end
This page was generated for Ruby 3.1.2
Ruby-doc.org is a service of James Britt and Neurogami, an erratic source of art, music, and technology.
Generated with Ruby-doc Rdoc Generator 0.42.0.