Class: Cask::Cmd::ExternalCommand Private

Inherits:
Object
  • Object
show all
Defined in:
brew/Library/Homebrew/cask/cmd.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Wrapper class for running an external command.

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ ExternalCommand

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ExternalCommand.



298
299
300
# File 'brew/Library/Homebrew/cask/cmd.rb', line 298

def initialize(path)
  @path = path
end

Instance Method Details

#helpObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



306
307
308
# File 'brew/Library/Homebrew/cask/cmd.rb', line 306

def help
  exec @path, "--help"
end

#run(*argv) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



302
303
304
# File 'brew/Library/Homebrew/cask/cmd.rb', line 302

def run(*argv)
  exec @path, *argv
end