blob: 5e2c838643f0da74339274d07acec08ca11c6d26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
'use strict';
const AbstractList = require('./abstract_list.js');
const PostMetric = require('./post_metric.js');
class PostMetricList extends AbstractList {
findByTagName(testName) {
for (let postMetric of this._list) {
if (postMetric.tagName.toLowerCase() === testName.toLowerCase()) {
return postMetric;
}
}
return null;
}
hasTagName(testName) {
return !!this.findByTagName(testName);
}
}
PostMetricList._itemClass = PostMetric;
PostMetricList._itemName = 'postMetric';
module.exports = PostMetricList;
|