Class: Homebrew::Cmd::Unpin Private

Inherits:
AbstractCommand show all
Defined in:
cmd/unpin.rb,
sorbet/rbi/dsl/homebrew/cmd/unpin.rbi
more...

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser, ruby_cmd?

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::Cmd::Unpin::Args

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

[View source]

10
# File 'sorbet/rbi/dsl/homebrew/cmd/unpin.rbi', line 10

def args; end

#runvoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

[View source]

20
21
22
23
24
25
26
27
28
29
30
# File 'cmd/unpin.rb', line 20

def run
  args.named.to_resolved_formulae.each do |f|
    if f.pinned?
      f.unpin
    elsif !f.pinnable?
      onoe "#{f.name} not installed"
    else
      opoo "#{f.name} not pinned"
    end
  end
end