original_string: public function pushAncestor($ancestor)
      {
          if (is_string($ancestor)) {
              $ancestor = new $ancestor;
          }
          if (!$ancestor instanceof AncestorCriteriaInterface) {
              throw new RepositoryException("Class " . get_class($ancestor) . " must be an instance of Aruberuto\\Repository\\Contracts\\AncestorCriteriaInterface");
          }
          $this->ancestor->push($ancestor);
  
          return $this;
      }
code: public function pushAncestor($ancestor)
      {
          if (is_string($ancestor)) {
              $ancestor = new $ancestor;
          }
          if (!$ancestor instanceof AncestorCriteriaInterface) {
              throw new RepositoryException("Class " . get_class($ancestor) . " must be an instance of Aruberuto\\Repository\\Contracts\\AncestorCriteriaInterface");
          }
          $this->ancestor->push($ancestor);
  
          return $this;
      }
code_tokens: public function pushAncestor ( $ ancestor ) { if ( is_string ( $ ancestor ) ) { $ ancestor = new $ ancestor ; } if ( ! $ ancestor instanceof AncestorCriteriaInterface ) { throw new RepositoryException ( "Class " . get_class ( $ ancestor ) . " must be an instance of Aruberuto\\Repository\\Contracts\\AncestorCriteriaInterface" ) ; } $ this -> ancestor -> push ( $ ancestor ) ; return $ this ; }
docstring: Push Ancestor for filter the query
  
  @param $ancestor
  
  @return $this
  @throws \Aruberuto\Repository\Exceptions\RepositoryException
docstring_tokens: Push Ancestor for filter the query