Module: Dradis::Plugins::Upload::Base::ClassMethods
- Defined in:
- lib/dradis/plugins/upload/base.rb
Instance Method Summary collapse
-
#templates ⇒ Object
Return the list of templates that the module provides def self.template_names { Dradis::Plugins::Burp::Html => { evidence: ‘html_evidence’, issue: ‘issue’ } }, { Dradis::Plugins::Burp::Xml => { evidence: ‘evidence’, issue: ‘issue’ } } end.
-
#uploaders ⇒ Object
Return the list of modules that provide upload functionality.
Instance Method Details
#templates ⇒ Object
Return the list of templates that the module provides
def self.template_names
{ Dradis::Plugins::Burp::Html => { evidence: 'html_evidence', issue: 'issue' } },
{ Dradis::Plugins::Burp::Xml => { evidence: 'evidence', issue: 'issue' } }
end
The default implementation returns nothing at all.
54 55 56 |
# File 'lib/dradis/plugins/upload/base.rb', line 54 def templates uploaders.each_with_object({}) { |uploader, acc| acc[uploader] = uploader::Importer.templates } end |
#uploaders ⇒ Object
Return the list of modules that provide upload functionality. This is useful if one plugin provides uploading functionality for more than one file type (e.g. the Projects plugin allows you to upload a Package or a Template).
The default implementation just returns this plugin’s namespace (e.g. Dradis::Plugins::Nessus). If a plugin provides multiple uploaders, they can override this method:
def self.uploders
[
Dradis::Plugins::Projects::Package,
Dradis::Plugins::Projects::Template
]
end
43 44 45 |
# File 'lib/dradis/plugins/upload/base.rb', line 43 def uploaders [module_parent] end |