<commit_before>import Ember from 'ember';

var get      = Ember.get;
var computed = Ember.computed;
var observer = Ember.observer;

export default Ember.ContainerView.extend(Ember._Metamorph, {
  type: null,

  childViews: computed(function() {
    return [this.componentForType()];
  }),

  changeChild: observer('type', function() {
    this.clear();
    this.pushObject(this.componentForType());
  }),

  componentForType: function() {
    var type = get(this, 'type');

    var container       = get(this, 'container');
    var componentLookup = container.lookup('component-lookup:main');
    var customComponent = componentLookup.lookupFactory(type, container);

    var options = this.get("_dynamicOptions");
    var hash    = options.hash;
    var ignore  = ["templateData", "_dynamicOptions", "_context", "_parentView", "helperName", "container"];
    var props   = {};

    var prop, bindingTarget;
    for (prop in hash) {
      if (ignore.indexOf(prop) !== -1) { continue; }
      if (prop.match(/Binding$/)) {
        bindingTarget = prop.replace("Binding", '');
        props[prop]   = "_parentView."+bindingTarget;
      } else {
        props[prop] = hash[prop];
      }
    }

    return customComponent.create(props);
  }
});<commit_msg>be consistent with  usage<commit_after>import Ember from 'ember';

var get      = Ember.get;
var computed = Ember.computed;
var observer = Ember.observer;

export default Ember.ContainerView.extend(Ember._Metamorph, {
  type: null,

  childViews: computed(function() {
    return [this.componentForType()];
  }),

  changeChild: observer('type', function() {
    this.clear();
    this.pushObject(this.componentForType());
  }),

  componentForType: function() {
    var type = get(this, 'type');

    var container       = get(this, 'container');
    var componentLookup = container.lookup('component-lookup:main');
    var customComponent = componentLookup.lookupFactory(type, container);

    var options = get(this, "_dynamicOptions");
    var hash    = options.hash;
    var ignore  = ["templateData", "_dynamicOptions", "_context", "_parentView", "helperName", "container"];
    var props   = {};

    var prop, bindingTarget;
    for (prop in hash) {
      if (ignore.indexOf(prop) !== -1) { continue; }
      if (prop.match(/Binding$/)) {
        bindingTarget = prop.replace("Binding", '');
        props[prop]   = "_parentView."+bindingTarget;
      } else {
        props[prop] = hash[prop];
      }
    }

    return customComponent.create(props);
  }
});
{'fraction_non_alphanumeric': 0.14994049980166602, 'fraction_numerical': 0.0007933359777865926, 'mean_word_length': 3.3557858376511227, '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': '2113779', 'n_tokens_mistral': 755, 'n_tokens_neox': 736, 'n_words': 168}