Class: Heroku::Command::Plugins

Inherits:
Base
  • Object
show all
Defined in:
lib/heroku/commands/plugins.rb

Instance Attribute Summary

Attributes inherited from Base

#args, #autodetected_app

Instance Method Summary collapse

Methods inherited from Base

#app_urls, #ask, #display, #error, #escape, #extract_app, #extract_app_in_dir, #extract_option, #format_date, #git_remotes, #git_url, #heroku, #initialize, #shell, #web_url

Methods included from Helpers

#home_directory, #running_on_a_mac?, #running_on_windows?

Constructor Details

This class inherits a constructor from Heroku::Command::Base

Instance Method Details

#installObject



10
11
12
13
14
15
16
17
# File 'lib/heroku/commands/plugins.rb', line 10

def install
	plugin = Heroku::Plugin.new(args.shift)
	if plugin.install
		display "#{plugin} installed"
	else
		error "Could not install #{plugin}. Please check the URL and try again"
	end
end

#listObject Also known as: index



3
4
5
6
7
# File 'lib/heroku/commands/plugins.rb', line 3

def list
	::Heroku::Plugin.list.each do |plugin|
		display plugin
	end
end

#uninstallObject



19
20
21
22
23
# File 'lib/heroku/commands/plugins.rb', line 19

def uninstall
	plugin = Heroku::Plugin.new(args.shift)
	plugin.uninstall
	display "#{plugin} uninstalled"
end