Class: MVCLI::PluginsController

Inherits:
Controller show all
Defined in:
lib/mvcli/plugins/controllers/plugins_controller.rb

Instance Attribute Summary

Attributes inherited from Controller

#params

Instance Method Summary collapse

Methods inherited from Controller

#call, #form, #initialize

Constructor Details

This class inherits a constructor from MVCLI::Controller

Instance Method Details

#indexObject



14
15
16
17
# File 'lib/mvcli/plugins/controllers/plugins_controller.rb', line 14

def index
  @plugins = bundle.plugins
  respond_with @plugins
end

#installObject



4
5
6
7
# File 'lib/mvcli/plugins/controllers/plugins_controller.rb', line 4

def install
  @installation = bundle.replace params[:name], form.attributes
  respond_with @installation
end

#respond_with(response, options = {}) ⇒ Object



19
20
21
# File 'lib/mvcli/plugins/controllers/plugins_controller.rb', line 19

def respond_with(response, options = {})
  response
end

#uninstallObject



9
10
11
12
# File 'lib/mvcli/plugins/controllers/plugins_controller.rb', line 9

def uninstall
  @installation = bundle.remove params[:name]
  respond_with @installation
end