<commit_before>

//api
var JSActiveModel = function(){
};

JSActiveModel.inheritKlass = function(k1, k2){
  k1.klass = k1["klass"] || {};
  for (var p in k2.klass) {
    k1.klass[p] = k2.klass[p];
  }
}

JSActiveModel.hideKlass = function(model){
  var wrapFunc = function(func) {
    return function() {
      return func.apply(model,arguments);
    };
  };

  for(var i in model.klass){
    model[i] = wrapFunc( model.klass[i] );
  }
}

JSActiveModel.scopeFunction = function( target, source, scope ){
}

JSActiveModel.parms = {
  foo : 'bar',
  baz : 'boo'
}

JSActiveModel.prototype = {
  update : function(){
    return 'here i am'
  },
  creating : function(){<commit_msg>Broke out the scopeFunction and scopeFunctions methods and added a reference to the parent's klass methods.<commit_after>

//api
var JSActiveModel = function(){
};

JSActiveModel.scopeFunction = function( func, scope ){
  return function() {
    return func.apply(model,arguments);
  };
}

JSActiveModel.scopeFunctions = function( target, source, scope ){
  for(var i in source){
    target[i] = scopeFunction( source[i], scope );
  }
}

JSActiveModel.inheritKlass = function(k1, k2){
  k1.klass = k1["klass"] || {};
  for (var p in k2.klass) {
    k1.klass[p] = k2.klass[p];
  }
  k1.parent = k1['parent'] || {};
  JSActiveModel.scopeFunctions( k1.parent, k2.klass, k1 );
}

JSActiveModel.hideKlass = function(model){
  model.klass = model['klass'] || {};
  JSActiveModel.scopeFunctions( model, model,klass, model );
}


JSActiveModel.parms = {
  foo : 'bar',
  baz : 'boo'
}

JSActiveModel.prototype = {
  update : function(){
    return 'here i am'
  },
  creating : function(){
{'fraction_non_alphanumeric': 0.15852923447860157, 'fraction_numerical': 0.011452682338758288, 'mean_word_length': 3.7025495750708215, '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': '473448', 'n_tokens_mistral': 586, 'n_tokens_neox': 614, 'n_words': 132}