docs: function (attributes, variables) {
          if (!attributes && !attributes.name) return;
          var el = new et.Element('plugin');
          el.attrib.name = attributes.name;
          if (attributes.spec) {
              el.attrib.spec = attributes.spec;
          }
  
          // support arbitrary object as variables source
          if (variables && typeof variables === 'object' && !Array.isArray(variables)) {
              variables = Object.keys(variables)
              .map(function (variableName) {
                  return {name: variableName, value: variables[variableName]};
              });
          }
  
          if (variables) {
              variables.forEach(function (variable) {
                  el.append(new et.Element('variable', { name: variable.name, value: variable.value }));
              });
          }
          this.doc.getroot().append(el);
      }