class method Cobra.Class.ancestor
Cobra.Class.ancestor(child, method[, args]) → Return Value
-
child
(Cobra.Class
|Object
) – The class or object you want to find the ancestor of. If passing an object, the object must be an instance of aCobra.Class
-
method
(String
) – The method to call on the first ancestor that has the method.
Invokes the specified method on the first parent class that has the specified method.
Example
init: function(self, arg) {
Cobra.Class.ancestor(MyCobra.Class|self, '__init__', self, arg);
}