text: 'use strict';
  
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  var logHandler = require('../logHandler.js');
  
  var Aggregator = function () {
      function Aggregator(opts) {
          _classCallCheck(this, Aggregator);
  
          this.logs = [];
          this.emailSettings = opts.emailSettings;
      }
  
      _createClass(Aggregator, [{
          key: 'send',
          value: function send(cb) {
              var msg = '';
              if (this.logs.length > 0) {
                  msg = this.logs.join('');
                  this.logs = [];
              } else {
                  msg = 'There were no logs added to the Aggregator';
              }
  
              logHandler.emailLog(this.emailSettings, msg, cb);
          }
      }, {
          key: 'addLog',
          value: function addLog(msg) {
              this.logs.push(msg);
          }
      }]);
  
      return Aggregator;
  }();
  
  module.exports = Aggregator;