Class: Homebrew::Cmd::UnlinkCmd

Inherits:
AbstractCommand show all
Defined in:
cmd/unlink.rb

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#runvoid

This method returns an undefined value.



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'cmd/unlink.rb', line 24

def run
  options = { dry_run: args.dry_run?, verbose: args.verbose? }

  args.named.to_default_kegs.each do |keg|
    if args.dry_run?
      puts "Would remove:"
      keg.unlink(**options)
      next
    end

    Unlink.unlink(keg, dry_run: args.dry_run?, verbose: args.verbose?)
  end
end