ancestor is included only when contributes some methods
334278
def append_ancestor_entry(ancestors, ancestor, class_methods, instance_methods = nil)
      if class_methods || instance_methods
        ancestor_entry = {}
        ancestor_entry[:class] = class_methods if class_methods
        ancestor_entry[:instance] = instance_methods if instance_methods
        ancestors << {ancestor => ancestor_entry}
      end
    end
341541
def ancestor(self, value):
        
        if not isinstance(value, Key):
            raise TypeError("Ancestor must be a Key")
        self._ancestor = value
1359446
function isLeftEdgeOf(node, ancestor) {
  while (node && node !== ancestor) {
    if (position(node) !== 0) {
      return false;
    }
    node = node.parentNode;
  }

  return true;
}
90457
def _get_ancestors(self, current=None):
        
        if not current:
            current = []
        current.insert(0, self)
        if self.is_root:
            if current:
                return current
        else:
            return self.parent._get_ancestors(current)
537769
function addChildAt(child, index) {
         if (index >= 0 && index < this.children.length) {
           if (child.ancestor instanceof me.Container) {
             child.ancestor.removeChildNow(child);
           } else {
             // only allocate a GUID if the object has no previous ancestor
             // (e.g. move one child from one container to another)
             if (child.isRenderable) {
               // allocated a GUID value
               child.GUID = me.utils.createGUID();
             }
           }

           child.ancestor = this;
           this.children.splice(index, 0, child);

           if (typeof child.onActivateEvent === "function" && this.isAttachedToRoot()) {
             child.onActivateEvent();
           }

           this.onChildChange.call(this, index);
           return child;
         } else {
           throw new Error("Index (" + index + ") Out Of Bounds for addChildAt()");
         }
       }
807770
def direct_descendants(include_singletons = false)
      return _inherited_by if BBLib.in_opal?
      ObjectSpace.each_object(Class).select do |c|
        (include_singletons || !c.singleton_class?) && c.ancestors[1..-1].find { |k| k.is_a?(Class) } == self
      end
    end
676665
def ancestors
        a = Array.new
        self.parent._ancestors(a) unless self.parent.nil?
        return a
    end
728052
void root(ProtoType type) {
    if (type == null) throw new NullPointerException("type == null");
    checkArgument(!identifierSet.excludes(type));
    checkArgument(!members.containsKey(type));
    types.add(type);
  }
153647
def method_missing method, *args, &block
      method, *args = special_handler(method, *args, &block) \
        if self.private_methods.include?(:special_handler)
      [method, args].flatten
    end
300108
function isAncestorIDOf(ancestorID, descendantID) {
  return (
    descendantID.indexOf(ancestorID) === 0 &&
    isBoundary(descendantID, ancestorID.length)
  );
}
702024
def ancestors(self):
        
        if self.parent is not None:
            yield self.parent
            for ancestor in self.parent.ancestors():
                yield ancestor
1200589
def get_ancestor_object_by_type(self, obj_type):
        

        if self.type.lower() == obj_type.lower():
            return self
        else:
            if not self.parent:
                return None
            return self.parent.get_ancestor_object_by_type(obj_type)
216712
def get_ancestors(self, include_self=False, depth=None):
        """"""
        if self.is_root_node():
            if not include_self:
                return self._toplevel().objects.none()
            else:
                # Filter on pk for efficiency.
                return self._toplevel().objects.filter(pk=self.pk)

        params = {"%s__child" % self._closure_parentref():self.pk}
        if depth is not None:
            params["%s__depth__lte" % self._closure_parentref()] = depth
        ancestors = self._toplevel().objects.filter(**params)
        if not include_self:
            ancestors = ancestors.exclude(pk=self.pk)
        return ancestors.order_by("%s__depth" % self._closure_parentref())
699585
def ancestors(self):
        
        ancestors = []
        p = self.parent
        while p is not None:
            ancestors.append(p)
            p = p.parent
        return ancestors
836575
function( includeSelf, ignoreTextNode ) {
			var start = this.startContainer,
				end = this.endContainer,
				ancestor;

			if ( start.equals( end ) ) {
				if ( includeSelf && start.type == CKEDITOR.NODE_ELEMENT && this.startOffset == this.endOffset - 1 )
					ancestor = start.getChild( this.startOffset );
				else
					ancestor = start;
			} else {
				ancestor = start.getCommonAncestor( end );
			}

			return ignoreTextNode && !ancestor.is ? ancestor.getParent() : ancestor;
		}
675407
function ancestorMatch(el, tokens, dividedTokens, root) {
      var cand
      // recursively work backwards through the tokens and up the dom, covering all options
      function crawl(e, i, p) {
        while (p = walker[dividedTokens[i]](p, e)) {
          if (isNode(p) && (found = interpret.apply(p, q(tokens[i])))) {
            if (i) {
              if (cand = crawl(p, i - 1, p)) return cand
            } else return p
          }
        }
      }
      return (cand = crawl(el, tokens.length - 1, el)) && (!root || isAncestor(cand, root))
    }
622453
def ancestor?(fei)

      fei = fei.to_h if fei.respond_to?(:to_h)

      return false unless h.parent_id
      return true if h.parent_id == fei

      parent.ancestor?(fei)
    end