All files / src/core/types action_filter_item.js

100% Statements 3/3
100% Branches 2/2
100% Functions 2/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 27 28 29 30 31 32 33 34 35                                    2x           2x             8x      
/**
 * @fileoverview Action filter item implementation.
 * @author Dmytro Antonenko <dmitry.antonenko@pubwebkit.com>
 */
import {ActionFilter} from '../action_filter.js';
import {ApplicationFilterItem} from './application_filter_item.js';
 
/**
 * Action filter item.
 * @extends {ApplicationFilterItem}
 */
export class ActionFilterItem extends ApplicationFilterItem {
  /**
   * @param {!ActionFilter} filter
   * @param {string|!RegExp=} opt_route Route to watch for.
   * @param {number=} opt_order
   */
  constructor(filter, opt_route, opt_order) {
    super(filter, opt_order);
 
    /**
     * @const {string|!RegExp}
     * @private
     */
    this.route_ = opt_route != null ? opt_route : '';
  }
 
  /**
   * @return {string|!RegExp}
   */
  getRoute() {
    return this.route_;
  }
}