all files / scripts/ads/vast/ Ad.js

92.86% Statements 13/14
83.33% Branches 5/6
100% Functions 2/2
92.86% Lines 13/14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26      65×     65×     64× 64×   64× 19×     64× 36×      
'use strict';
 
var InLine = require('./InLine');
var Wrapper = require('./Wrapper');
 
function Ad(adJTree) {
  Iif (!(this instanceof Ad)) {
    return new Ad(adJTree);
  }
  this.initialize(adJTree);
}
 
Ad.prototype.initialize = function(adJTree) {
  this.id = adJTree.attr('id');
  this.sequence = adJTree.attr('sequence');
 
  if(adJTree.inLine) {
    this.inLine = new InLine(adJTree.inLine);
  }
 
  if(adJTree.wrapper){
    this.wrapper = new Wrapper(adJTree.wrapper);
  }
};
 
module.exports = Ad;