Test Setup Failed
Push — master ( ae6bbc...554531 )
by
unknown
09:25 queued 04:41
created

collection.js ➔ define   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 31

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
dl 0
loc 31
rs 8.8571
c 0
b 0
f 0
nop 1

2 Functions

Rating   Name   Duplication   Size   Complexity  
A collection.js ➔ ... ➔ Backbone.Collection.extend.initialize 0 4 1
A collection.js ➔ ... ➔ WidgetsCollection 0 3 1
1
define(function(require) {
2
    'use strict';
3
4
    var WidgetsCollection;
5
    var _ = require('underscore');
6
    var Backbone = require('backbone');
7
    var WidgetContainerModel = require('./model');
8
9
    WidgetsCollection = Backbone.Collection.extend({
10
        model: WidgetContainerModel,
11
12
        comparator: 'position',
13
14
        /**
15
         * @inheritDoc
16
         */
17
        constructor: function WidgetsCollection() {
18
            WidgetsCollection.__super__.constructor.apply(this, arguments);
19
        },
20
21
        /**
22
         * @inheritDoc
23
         */
24
        initialize: function(data, options) {
25
            _.extend(this, _.pick(options, ['url']));
26
            WidgetsCollection.__super__.initialize.apply(this, arguments);
27
        }
28
    });
29
30
    return WidgetsCollection;
31
});
32