<commit_before>/**
 @module sys
 @submodule component
 */

var Component = new Brick.Component();
Component.requires = {
};
Component.entryPoint = function(NS){

    var Y = Brick.YUI;

    /**
     * Template extension, which can be used to manage template.
     * @class Template
     * @param {Object} config User configuration object
     */
    var Template = function(config){
    };

    /**
     * Static property used to define the default attribute
     * configuration introduced by Template.
     *
     * @property ATTRS
     * @static
     * @type Object
     */
    Template.ATTRS = {
        /**
         * @attribute component
         * @type Brick.Component
         * @description TODO. Wanna help? Please send a Pull Request.
         */
        component: {
            value: null
        },

        /**
         * @attribute templateBlockName
         * @type String
         * @default ""
         * @description TODO. Wanna help? Please send a Pull Request.
         */
        templateBlockName: {
            value: null
        }
    };
    Template.prototype = {

        /**
         * TODO. Wanna help? Please send a Pull Request.
         *
         * @property template
         * @type Abricos.TemplateManager
         */
        template: null,

        initializer: function(){
            var component = this.get('component');

            if (!component){
                Y.error('Component must be set in attribute of Template class');
                return;
            }

            var tBlockNames = this.get('templateBlockName');

            this.template = new Abricos.TemplateManager(component.key, tBlockNames);
        }
    };<commit_msg>get element by template key<commit_after>/**
 @module sys
 @submodule component
 */

var Component = new Brick.Component();
Component.requires = {
};
Component.entryPoint = function(NS){

    var Y = Brick.YUI;

    /**
     * Template extension, which can be used to manage template.
     * @class Template
     * @param {Object} config User configuration object
     */
    var Template = function(config){
    };

    /**
     * Static property used to define the default attribute
     * configuration introduced by Template.
     *
     * @property ATTRS
     * @static
     * @type Object
     */
    Template.ATTRS = {
        /**
         * @attribute component
         * @type Brick.Component
         * @description TODO. Wanna help? Please send a Pull Request.
         */
        component: {
            value: null
        },

        /**
         * @attribute templateBlockName
         * @type String
         * @default ""
         * @description TODO. Wanna help? Please send a Pull Request.
         */
        templateBlockName: {
            value: null
        }
    };
    Template.prototype = {

        /**
         * TODO. Wanna help? Please send a Pull Request.
         *
         * @property template
         * @type Abricos.TemplateManager
         */
        template: null,

        initializer: function(){
            var component = this.get('component');

            if (!component){
                Y.error('Component must be set in attribute of Template class');
                return;
            }

            var tBlockNames = this.get('templateBlockName');

            this.template = new Abricos.TemplateManager(component.key, tBlockNames);
        },

        gel: function(elKey){
            var el = this.template.gel(elKey);
            return el ? Y.one(el) : null;
        }
    };
{'fraction_non_alphanumeric': 0.10201190138849532, 'fraction_numerical': 0.0, 'mean_word_length': 1.6343283582089552, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1662874', 'n_tokens_mistral': 914, 'n_tokens_neox': 886, 'n_words': 269}