function(klass) {
    var view = get(this, 'parentView');

    while (view) {
      if (get(view, 'parentView') instanceof klass) { return view; }
      view = get(view, 'parentView');
    }
  }
function(klass) {
    var view = get(this, 'parentView');

    while (view) {
      if (get(view, 'parentView') instanceof klass) { return view; }
      view = get(view, 'parentView');
    }
  }
function ( klass ) { var view = get ( this , 'parentView' ) ; while ( view ) { if ( get ( view , 'parentView' ) instanceof klass ) { return view ; } view = get ( view , 'parentView' ) ; } }
Return the nearest ancestor whose parent is an instance of
`klass`.

@method nearestChildOf
@param {Class} klass Subclass of Ember.View (or Ember.View itself)
@return Ember.View
Return the nearest ancestor whose parent is an instance of klass .