Sha256: 4604383e0bccb43941bd67feb71826dcc63ac93b1434c615533a80c06d01d1e3

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

module Dradis::Plugins::Projects::Export
  class Template < Dradis::Plugins::Export::Base
    # This method returns an XML representation of current repository which
    # includes Categories, Nodes and Notes
    def export(args={})
      builder = Builder::XmlMarkup.new
      builder.instruct!
      result = builder.tag!('dradis-template', version: version) do |template_builder|
        build_nodes(template_builder)
        build_issues(template_builder)
        build_methodologies(template_builder)
        build_categories(template_builder)
        build_tags(template_builder)
      end
      return result
    end

    private
    def build_categories(builder);    raise NotImplementedError; end
    def build_issues(builder);        raise NotImplementedError; end
    def build_methodologies(builder); raise NotImplementedError; end
    def build_nodes(builder);         raise NotImplementedError; end
    def build_tags(builder);          raise NotImplementedError; end
    def version;                      raise NotImplementedError; end
  end
end

require_relative 'v1/template'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dradis-projects-3.7.0 lib/dradis/plugins/projects/export/template.rb
dradis-projects-3.6.0 lib/dradis/plugins/projects/export/template.rb