# Code coverage report for lib/attributes/script.js

## Statements: 100% (11 / 11) Branches: 100% (2 / 2) Functions: 75% (3 / 4) Lines: 100% (10 / 10) Ignored: none

All files » lib/attributes/ » script.js

    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
    351

    1

    20
    20
    20
    31
    29
    29

    20

    6

     var BaseAttribute = require("./base");

    /**
     */

    module.exports = BaseAttribute.extend({

      /**
       */

      bind: function (context) {
        BaseAttribute.prototype.bind.call(this, context)
        var self = this;
        this._binding = this.value.bind(this.view.runner, context, function (nv, ov) {
          if (nv == ov) return;
          self.currentValue = nv;
          self.update();
        });
        this._binding.now();
      },

      /**
       */

      update: function () {

      },

      /**
       */

      unbind: function () {
        this._binding.dispose();
      }
    });