class Kontena::PluginManager::Uninstaller
Attributes
plugin_name[R]
Public Class Methods
new(plugin_name)
click to toggle source
# File lib/kontena/plugin_manager/uninstaller.rb, line 10 def initialize(plugin_name) @plugin_name = plugin_name end
Public Instance Methods
command(spec)
click to toggle source
# File lib/kontena/plugin_manager/uninstaller.rb, line 14 def command(spec) @command ||= Gem::Uninstaller.new( spec.name, all: true, executables: true, force: true, install_dir: spec.base_dir ) end
uninstall()
click to toggle source
Uninstall a plugin @param plugin_name
[String]
# File lib/kontena/plugin_manager/uninstaller.rb, line 26 def uninstall installed = installed(plugin_name) raise "Plugin #{plugin_name} not installed" unless installed command(installed).uninstall end