123456789101112131415161718192021222324252627282930313233 |
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- define([
- 'uiClass',
- 'Magento_Paypal/js/rules'
- ], function (Class, Rules) {
- 'use strict';
- return Class.extend({
- /**
- * Constructor
- *
- * @param {Object} config
- * @returns {exports.initialize}
- */
- initialize: function (config) {
- this.rules = new Rules();
- this.initConfig(config);
- return this;
- },
- /**
- * To apply the rule
- */
- apply: function () {
- this.rules[this.name](this.$target, this.$owner, this.data);
- }
- });
- });
|