Module: Brew
- Defined in:
- lib/brew.rb,
lib/brew/version.rb,
lib/brew/home_brew.rb,
lib/brew/commands/info.rb,
lib/brew/commands/list.rb,
lib/brew/commands/search.rb,
lib/brew/commands/update.rb,
lib/brew/commands/install.rb,
lib/brew/commands/upgrade.rb,
lib/brew/commands/uninstall.rb,
lib/brew/utils/system_runner.rb
Defined Under Namespace
Modules: Commands Classes: Error, ExecutionError, HomeBrew, HomeBrewNotInstalled, SystemRunner
Constant Summary collapse
- VERSION =
'0.2.2'
Instance Method Summary collapse
Instance Method Details
#brew(command, formula = nil, brew_path: nil, **kwargs) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/brew.rb', line 11 def brew(command, formula = nil, brew_path: nil, **kwargs) client = HomeBrew.new(brew_path: brew_path) case command.to_sym when :info then client.info(formula, **kwargs) when :install then client.install(formula, **kwargs) when :list then client.list(formula, **kwargs) when :ls then client.ls(formula, **kwargs) when :rm then client.rm(formula, **kwargs) when :remove then client.remove(formula, **kwargs) when :uninstall then client.uninstall(formula, **kwargs) when :update then client.update(**kwargs) when :up then client.up(**kwargs) when :upgrade then client.upgrade(formula, **kwargs) else raise NotImplementedError end end |