<commit_before>// Includes file dependencies
define([
    "underscore",
    "parse",
    "../collections/BNSMETV1_ClanRules",
], function( _, Parse, BNSMETV1_ClanRules ) {

    var VampireCosts = Parse.Object.extend("VampireCosts", {
        initialize: function() {
            var self = this;

            self.ClanRules = new BNSMETV1_ClanRules;
            return self.ClanRules.fetch();
        },

        get_in_clan_disciplines: function(character) {
            var self = this;
            var icds = self.ClanRules.get_in_clan_disciplines(character);
            var eicds = _.map(character.get('extra_in_clan_disciplines'), "attributes.name");
            icds = [].concat(icds, eicds);
            return icds;<commit_msg>Avoid reloading clan rules for each vampire<commit_after>// Includes file dependencies
define([
    "underscore",
    "parse"
], function( _, Parse ) {

    var VampireCosts = Parse.Object.extend("VampireCosts", {
        initialize: function() {
            var self = this;

            self.ClanRules = BNSMETV1_ClanRules;
            return Parse.Promise.as(self.ClanRules);
        },

        get_in_clan_disciplines: function(character) {
            var self = this;
            var icds = self.ClanRules.get_in_clan_disciplines(character);
            var eicds = _.map(character.get('extra_in_clan_disciplines'), "attributes.name");
            icds = [].concat(icds, eicds);
            return icds;
{'fraction_non_alphanumeric': 0.11341632088520055, 'fraction_numerical': 0.0027662517289073307, 'mean_word_length': 2.4534606205250595, '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': '1785146', 'n_tokens_mistral': 459, 'n_tokens_neox': 447, 'n_words': 84}