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.



223
224
225
# File 'brew/Library/Homebrew/cask/cmd.rb', line 223

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.



231
232
233
# File 'brew/Library/Homebrew/cask/cmd.rb', line 231

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.



227
228
229
# File 'brew/Library/Homebrew/cask/cmd.rb', line 227

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