The ExportController provides access to the different export plugins that have been deployed in the dradis server.
Each export plugin will include itself in the Plugins::Export module and this controller will include it so all the functionality provided by the different plugins is exposed.
A convenience list method is provided that will return all the currently loaded plugins.
Methods
Included Modules
Public Instance methods
This method provides a list of all the available export options. It assumes that each export plugin includes sub-modules in the Plugins::Export mixing.
[ show source ]
# File app/controllers/export_controller.rb, line 37
37: def list
38: respond_to do |format|
39: format.html{ redirect_to '/' }
40: format.json{
41: list = []
42: Plugins::Export.included_modules.each do |plugin|
43: list << { :name => plugin.name.underscore.humanize.gsub(/\//,' - '), :actions => [] }
44: if (plugin.constants.include?('Actions'))
45: list.last[:actions] = plugin::Actions.instance_methods.sort
46: end
47: end
48:
49: render :json => list
50: }
51: end
52: end