Sha256: 8cc8384c059c49d93e598af882cbd82677f45d95b177343b566412b0cdb0cbe1

Contents?: true

Size: 912 Bytes

Versions: 5

Compression:

Stored size: 912 Bytes

Contents

Ext.define('Sample.Person', {
    uses: 'Sample.Gun',

    statics: {
        averageIQ: 100
    },

    config: {
        name: 'Unknown',
        gender: 'unknown',
        isCool: false,
        height: 5.8
    },

    constructor: function(config) {
        this.initConfig(config);

        return this;
    },

    eat: function(foodType) {
        alert("I'm eating: " + foodType);

        return this;
    },

    applyScroller: function(scroller) {
        return new Ext.util.Scroller(scroller);
    },

    applyHeight: function(height) {
        return parseFloat(height);
    },

    applyName: function(name) {
        return name || 'Unknown';
    },

    applyGender: function(gender) {
        if (!/^(male|female|gay|lesbian)$/.test(gender)) {
            return 'unknown';
        }

        return gender;
    },

    getAverageIQ: function() {
        return this.self.averageIQ;
    }
});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
extjs-rails-4.1.0.alpha5 app/assets/javascripts/src/core/examples/src/Sample/Person.js
extjs-rails-4.1.0.alpha4 app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Person.js
extjs-rails-4.1.0.alpha3 app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Person.js
extjs-rails-4.1.0.alpha2 app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Person.js
extjs-rails-4.1.0.alpha1 app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Person.js